diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-05-10 09:05:12 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-05-25 11:52:13 -0400 |
commit | c812a40a3782415e454b04bf7bd2158a6f0ec8b5 (patch) | |
tree | 95801ef41dbe9093d41a064379fd9100db0d76dd /src/lpc176x/gpio.h | |
parent | 65613aeddfb9ef86905cb1dade9e773a02ef3c27 (diff) | |
download | kutter-c812a40a3782415e454b04bf7bd2158a6f0ec8b5.tar.gz kutter-c812a40a3782415e454b04bf7bd2158a6f0ec8b5.tar.xz kutter-c812a40a3782415e454b04bf7bd2158a6f0ec8b5.zip |
lpc176x: Add ADC support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/lpc176x/gpio.h')
-rw-r--r-- | src/lpc176x/gpio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lpc176x/gpio.h b/src/lpc176x/gpio.h index 030528e6..79a84823 100644 --- a/src/lpc176x/gpio.h +++ b/src/lpc176x/gpio.h @@ -19,4 +19,12 @@ struct gpio_in { struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up); uint8_t gpio_in_read(struct gpio_in g); +struct gpio_adc { + uint32_t cmd; +}; +struct gpio_adc gpio_adc_setup(uint8_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 |