X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Flpc%2Fao_adc_lpc.c;fp=src%2Flpc%2Fao_adc_lpc.c;h=1fbf13660a5969739cf496d602acf699e4abb371;hb=c2b775a6cd8888f98f086b4b730edb31bb846f91;hp=29d3668cedb1fdff4824dfa5ba2494610604ab81;hpb=f856f20b31c542caeb5decbf3546c6a0242ab33d;p=fw%2Faltos diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c index 29d3668c..1fbf1366 100644 --- a/src/lpc/ao_adc_lpc.c +++ b/src/lpc/ao_adc_lpc.c @@ -57,7 +57,10 @@ /* ADC clock is divided by this value + 1, which ensures that * the ADC clock will be strictly less than 4.5MHz as required */ -#define AO_ADC_CLKDIV (AO_LPC_SYSCLK / 450000) +#ifndef AO_LPC_ADC_CLOCK +#define AO_LPC_ADC_CLOCK 4500000 +#endif +#define AO_ADC_CLKDIV (AO_LPC_SYSCLK / AO_LPC_ADC_CLOCK) static uint8_t ao_adc_ready; static uint8_t ao_adc_sequence;