uint32_t status = adc->status;
*/
/* .... What to do ... is specific to your application */
+ /* FIXME : Add an handler callback. */
}
/* Start a conversion on the given channel (0 to 7) */
/* Unsupported Yet */
}
-/* On LPC1224 there is no possibility to change the ADC resolution */
+/* Change the ADC resolution. */
void adc_set_resolution(int bits)
{
+ /* On LPC1224 there is no possibility to change the ADC resolution */
+ return;
}
/* ADC Setup : private part : Clocks, Pins, Power and Mode */
extern struct pio adc_pins[];
-void set_adc_pins(void)
+static void set_adc_pins(void)
{
int i = 0;
/* Configure ADC pins */
/* Prevent unconfigured conversion start */
adc->ctrl &= ~LPC_ADC_START_CONV_MASK;
+ /* Configure ADC pins */
+ set_adc_pins();
+
/* Enable ADC Interrupt */
NVIC_EnableIRQ(ADC_IRQ);
}
/***************************************************************************** */
#include <stdint.h>
-#include "core/lpc_regs_12xx.h"
-#include "core/lpc_core_cm0.h"
-#include "core/system.h"
/* Start a conversion on the given channel (0 to 7) */
void adc_start_convertion_once(unsigned int channel, int use_int);
*/
void adc_prepare_conversion_on_event(void);
-/* On LPC1224 there is no possibility to change the ADC resolution */
+/* Change the ADC resolution. */
+/* Note : On LPC1224 there is no possibility to change the ADC resolution */
void adc_set_resolution(int bits);
/***************************************************************************** */
/* ADC Setup : private part : Clocks, Pins, Power and Mode */
-void set_adc_pins(void);
void adc_clk_update(void);
void adc_on(void);
void adc_off(void);