mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-21 13:48:00 -06:00
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:
parent
fe95ea221b
commit
872b08601a
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue