mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-28 18:10:21 +00:00
*** EFM32 branch ***
1. Add IIC slave mode RX by interrupt function (Now, master mode TX/RX and slave mode RX functions are done) 2. Add Timer1 configuration in timer driver 3. Modify the ACMP default initialization setting 4. Add on/off switch for debug code to reduce size git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1353 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -253,7 +253,8 @@ void rt_hw_adc_init(void)
|
||||
struct efm32_adc_device_t *adc;
|
||||
ADC_Init_TypeDef init = ADC_INIT_DEFAULT;
|
||||
|
||||
init.ovsRateSel = adcOvsRateSel4096; //TODO
|
||||
// TODO: Fixed oversampling rate?
|
||||
init.ovsRateSel = adcOvsRateSel4096;
|
||||
init.timebase = ADC_TimebaseCalc(0);
|
||||
init.prescale = ADC_PrescaleCalc(ADC_CONVERT_FREQUENCY, 0);
|
||||
|
||||
@@ -262,7 +263,9 @@ void rt_hw_adc_init(void)
|
||||
adc = rt_malloc(sizeof(struct efm32_adc_device_t));
|
||||
if (adc == RT_NULL)
|
||||
{
|
||||
#ifdef RT_ADC_DEBUG
|
||||
rt_kprintf("no memory for ADC driver\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
adc->adc_device = ADC0;
|
||||
|
||||
Reference in New Issue
Block a user