X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fadc_at91.h;h=6c77de0f431a72dabdfe013b9a1367746cb28e2e;hb=0e3af97aae82cb7ca21366ff2c6cbb2794ae956a;hp=49f0de3197f987487a07204939da4b4f6b64a57e;hpb=211f1718bc7a3553323733eea821a477decf0cc7;p=bertos.git diff --git a/bertos/cpu/arm/drv/adc_at91.h b/bertos/cpu/arm/drv/adc_at91.h index 49f0de31..6c77de0f 100644 --- a/bertos/cpu/arm/drv/adc_at91.h +++ b/bertos/cpu/arm/drv/adc_at91.h @@ -41,10 +41,11 @@ #ifndef DRV_ADC_AT91_H #define DRV_ADC_AT91_H -#include +#include + +#include "cfg/cfg_adc.h" -#include "hw_cpu.h" -#include "appconfig.h" +#include /** * ADC config define. @@ -56,7 +57,7 @@ * Macro for computing correct value to write into ADC * register. */ -#define ADC_COMPUTED_PRESCALER ((CLOCK_FREQ/(2 * CONFIG_ADC_CLOCK)) - 1) +#define ADC_COMPUTED_PRESCALER ((CPU_FREQ/(2 * CONFIG_ADC_CLOCK)) - 1) #define ADC_COMPUTED_STARTUPTIME (((CONFIG_ADC_STARTUP_TIME * CONFIG_ADC_CLOCK)/ 8000000UL) - 1) #define ADC_COMPUTED_SHTIME (((CONFIG_ADC_SHTIME * CONFIG_ADC_CLOCK)/1000000000UL) - 1)