diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-07-26 21:47:42 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-07-27 10:58:28 -0400 |
commit | d79f99b1888d1529e59b5e408eee648255b087b2 (patch) | |
tree | 3fdd24b364906f4d1bd20307363e8b05d37aca67 /src/stm32f4/gpio.h | |
parent | a878831d5ea8eb86a1bcd94a6a2da926a84d5b6a (diff) | |
download | kutter-d79f99b1888d1529e59b5e408eee648255b087b2.tar.gz kutter-d79f99b1888d1529e59b5e408eee648255b087b2.tar.xz kutter-d79f99b1888d1529e59b5e408eee648255b087b2.zip |
stm32f4: Add support for ADC
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32f4/gpio.h')
-rw-r--r-- | src/stm32f4/gpio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stm32f4/gpio.h b/src/stm32f4/gpio.h index 025b30e1..6aaf02c3 100644 --- a/src/stm32f4/gpio.h +++ b/src/stm32f4/gpio.h @@ -21,4 +21,12 @@ struct gpio_in gpio_in_setup(uint32_t pin, int32_t pull_up); void gpio_in_reset(struct gpio_in g, int32_t pull_up); uint8_t gpio_in_read(struct gpio_in g); +struct gpio_adc { + uint32_t chan; +}; +struct gpio_adc gpio_adc_setup(uint32_t pin); +uint32_t gpio_adc_sample(struct gpio_adc g); +uint16_t gpio_adc_read(struct gpio_adc g); +void gpio_adc_cancel_sample(struct gpio_adc g); + #endif // gpio.h |