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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user