mcu: Obtain the maximum adc value from the firmware

Don't assume the hardware ADC has 10bit resultion - instead have the
firmware define a constant and read that constant in the host.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-12-22 23:58:51 -05:00
parent fe95ea221b
commit 872b08601a
2 changed files with 4 additions and 2 deletions

View file

@ -258,6 +258,8 @@ gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val)
}
DECL_CONSTANT(ADC_MAX, 1024);
struct gpio_adc
gpio_adc_setup(uint8_t pin)
{