2016-09-05 00:27:44 +02:00
|
|
|
|
|
|
|
|
extern void I2CWrite(int addr, uint8_t d0, uint8_t d1);
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int target_level;
|
|
|
|
|
int gain_hysteresis;
|
|
|
|
|
int attack;
|
|
|
|
|
int attack_scale;
|
|
|
|
|
int decay;
|
|
|
|
|
int decay_scale;
|
|
|
|
|
} tlv320aic3204_agc_config_t;
|
|
|
|
|
|
|
|
|
|
extern void tlv320aic3204_init(void);
|
|
|
|
|
extern void tlv320aic3204_set_gain(int lgain, int rgain);
|
|
|
|
|
extern void tlv320aic3204_set_digital_gain(int gain);
|
|
|
|
|
extern void tlv320aic3204_set_volume(int gain);
|
|
|
|
|
extern void tlv320aic3204_agc_config(tlv320aic3204_agc_config_t *conf);
|
2016-09-05 01:33:05 +02:00
|
|
|
extern void tlv320aic3204_select_in1(void);
|
|
|
|
|
extern void tlv320aic3204_select_in3(void);
|
2016-09-05 00:27:44 +02:00
|
|
|
|
|
|
|
|
extern void ui_init(void);
|
|
|
|
|
extern void ui_process(void);
|
|
|
|
|
|
|
|
|
|
// 5ms @ 48kHz
|
2016-09-30 02:42:49 +02:00
|
|
|
#define AUDIO_BUFFER_LEN 96
|
2016-09-05 00:27:44 +02:00
|
|
|
|
|
|
|
|
extern int16_t rx_buffer[];
|
|
|
|
|
extern int16_t tx_buffer[];
|
|
|
|
|
|
2016-09-18 03:11:18 +02:00
|
|
|
#define STATE_LEN 32
|
2016-09-30 02:42:49 +02:00
|
|
|
#define SAMPLE_LEN 48
|
2016-09-05 00:27:44 +02:00
|
|
|
|
2016-09-18 03:11:18 +02:00
|
|
|
extern int16_t ref_state[];
|
|
|
|
|
extern int16_t ref_buf[];
|
|
|
|
|
extern int16_t samp_buf[];
|
|
|
|
|
|
2016-09-19 02:31:50 +02:00
|
|
|
//extern int16_t refq_buf[];
|
|
|
|
|
extern int16_t refiq_buf[];
|
|
|
|
|
|
2016-09-18 03:11:18 +02:00
|
|
|
void dsp_process(int16_t *src, size_t len);
|
2016-09-28 15:48:53 +02:00
|
|
|
void calclate_gamma(float *gamma);
|
2016-09-05 00:27:44 +02:00
|
|
|
|
2016-09-24 03:25:13 +02:00
|
|
|
int si5351_set_frequency_with_offset(int freq, int offset, uint8_t drive_strength);
|
2016-09-26 17:06:00 +02:00
|
|
|
|
|
|
|
|
void ili9341_init(void);
|
|
|
|
|
void ili9341_test(int mode);
|
|
|
|
|
|
2016-09-30 02:42:49 +02:00
|
|
|
void set_sweep(int32_t start, int stop);
|
2016-10-04 01:16:01 +02:00
|
|
|
void sweep_plot(int32_t freq, int first, float measured[4]);
|
2016-09-28 15:48:53 +02:00
|
|
|
void sweep_tail(void);
|
2016-10-01 15:54:48 +02:00
|
|
|
void redraw(void);
|
2016-10-04 01:16:01 +02:00
|
|
|
void polar_plot(float measured[101][4]);
|
2016-09-28 01:47:46 +02:00
|
|
|
|
2016-10-14 14:47:00 +02:00
|
|
|
extern uint16_t cal_status;
|
|
|
|
|
extern float cal_data[101][5][2];
|
|
|
|
|
|
|
|
|
|
#define CAL_LOAD 0
|
|
|
|
|
#define CAL_OPEN 1
|
|
|
|
|
#define CAL_SHORT 2
|
|
|
|
|
#define CAL_THRU 3
|
|
|
|
|
#define CAL_ISOLN 4
|
|
|
|
|
|
|
|
|
|
#define CALSTAT_LOAD (1<<0)
|
|
|
|
|
#define CALSTAT_OPEN (1<<1)
|
|
|
|
|
#define CALSTAT_SHORT (1<<2)
|
|
|
|
|
#define CALSTAT_THRU (1<<3)
|
|
|
|
|
#define CALSTAT_ISOLN (1<<4)
|
|
|
|
|
#define CALSTAT_APPLY (1<<5)
|
|
|
|
|
|
|
|
|
|
|
2016-10-13 20:56:08 +02:00
|
|
|
void plot_into_index(float measured[101][2][2]);
|
2016-10-13 13:25:31 +02:00
|
|
|
void draw_cell_all(void);
|
|
|
|
|
|
2016-09-26 17:06:00 +02:00
|
|
|
extern const uint16_t x5x7_bits [];
|
|
|
|
|
extern const uint32_t numfont20x24[][24];
|
|
|
|
|
|