diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-01-12 14:58:53 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-01-14 13:08:45 -0500 |
commit | d3ec103816a5bbab60422557e4610aa2d5fe9435 (patch) | |
tree | 616aa2d7072cfc5e784c6649c22544e3d43270bf /src/lpc176x/gpio.h | |
parent | cb2ecc68d2b23e82b57f765cdb45286bbfcab16e (diff) | |
download | kutter-d3ec103816a5bbab60422557e4610aa2d5fe9435.tar.gz kutter-d3ec103816a5bbab60422557e4610aa2d5fe9435.tar.xz kutter-d3ec103816a5bbab60422557e4610aa2d5fe9435.zip |
lpc176x: Implement a median filter on ADC readings
The lpc176x ADC is extremely noisy. Implement a 5 order median filter
on each ADC read to weed out obviously incorrect readings.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/lpc176x/gpio.h')
-rw-r--r-- | src/lpc176x/gpio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpc176x/gpio.h b/src/lpc176x/gpio.h index 79d48698..30f8ab13 100644 --- a/src/lpc176x/gpio.h +++ b/src/lpc176x/gpio.h @@ -22,7 +22,7 @@ void gpio_in_reset(struct gpio_in g, int8_t pull_up); uint8_t gpio_in_read(struct gpio_in g); struct gpio_adc { - uint32_t cmd; + uint32_t chan; }; struct gpio_adc gpio_adc_setup(uint8_t pin); uint32_t gpio_adc_sample(struct gpio_adc g); |