fix: sstv mode

This commit is contained in:
liuyihui 2023-04-27 21:58:11 +08:00
parent 07e8a842ec
commit b42a51545a
2 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@
#define FREQ_BIT0 1300
#define FREQ_START 1900
#define FREQ_BLACK 1500
#define FREQ_WHITE 7500
#define FREQ_WHITE 4000
#define FREQ_RANGE FREQ_WHITE - FREQ_BLACK
#define COLOR_SCALE 256
#define COLOR_SCALE 64
uint8_t decode_sstv();

View File

@ -10,7 +10,7 @@ void ADC0_Init() {
PORTE->PCR[21] |= PORT_PCR_MUX(0x0);
ADC0->CFG1 = ADC_CFG1_ADLSMP_MASK // Sample time 0 = Short, 1 = Long
| ADC_CFG1_MODE(0x01); // Conversion mode 00 = 8-bit, 01 = 12-bit, 10 = 10-bit, 11 = 16-bit
| ADC_CFG1_MODE(0b01); // Conversion mode 00 = 8-bit, 01 = 12-bit, 10 = 10-bit, 11 = 16-bit
ADC0->SC3 = ADC_SC3_ADCO_MASK // Continuous Conversion if AVGE = 1
| ADC_SC3_AVGE_MASK // Hardware average
| ADC_SC3_AVGS(0x01); // Hardware average 00 = 4 samples, 01 = 8, 10 = 16, 11 = 32