diff options
| author | Keith Packard <keithp@keithp.com> | 2012-04-07 18:55:20 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-04-07 18:55:20 -0700 |
| commit | 9b9357f48597a034211affb3f18fc6089816456d (patch) | |
| tree | e34ba9dc0dde3ad5c1dc2cafe412dc26c22381e3 /src/stm-demo/ao_pins.h | |
| parent | b5e9d14b4e3e8f29ad8a7bb9b339890be4bcfa2f (diff) | |
altos: Add ADC tests to stm-demo
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm-demo/ao_pins.h')
| -rw-r--r-- | src/stm-demo/ao_pins.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/stm-demo/ao_pins.h b/src/stm-demo/ao_pins.h index 09c88f90..fecd8cda 100644 --- a/src/stm-demo/ao_pins.h +++ b/src/stm-demo/ao_pins.h @@ -111,4 +111,29 @@ #define AO_LCD_28_ON_C 1 +#define HAS_ADC 1 + +#define AO_ADC_RING 32 + +struct ao_adc { + uint16_t tick; + int16_t idd; + int16_t temp; +}; + +#define AO_ADC_IDD 4 +#define AO_ADC_PIN0_PORT stm_gpioa +#define AO_ADC_PIN0_PIN 4 + +#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN)) +#define AO_ADC_TEMP 16 + +#define HAS_ADC_TEMP 1 + +#define AO_NUM_ADC 2 + +#define AO_ADC_SQ1 AO_ADC_IDD +#define AO_ADC_SQ2 AO_ADC_TEMP + + #endif /* _AO_PINS_H_ */ |
