mirror of
git://soft.sys114.com/klipper
synced 2026-02-04 14:50:35 +09:00
ODROID-C5: change adc max value and adc file path
ODROID-C5 has two internal 10bit ADCs. However, the value of in_voltage0_raw outputs a difficult number. So, klipper read "in_voltage0_input", which outputs the actual voltage value, to read the value of ADC. Change-Id: I32aada4e66e6034823bf66c41fccf178d6ff50d0
This commit is contained in:
@@ -13,13 +13,15 @@
|
|||||||
#include "internal.h" // report_errno
|
#include "internal.h" // report_errno
|
||||||
#include "sched.h" // sched_shutdown
|
#include "sched.h" // sched_shutdown
|
||||||
|
|
||||||
DECL_CONSTANT("ADC_MAX", 4095); // Assume 12bit adc
|
// ODROID-C5
|
||||||
|
DECL_CONSTANT("ADC_MAX", 1800); // Assume 12bit adc
|
||||||
|
|
||||||
#define ANALOG_START (1<<12)
|
#define ANALOG_START (1<<12)
|
||||||
|
|
||||||
DECL_ENUMERATION_RANGE("pin", "analog0", ANALOG_START, 8);
|
DECL_ENUMERATION_RANGE("pin", "analog0", ANALOG_START, 8);
|
||||||
|
|
||||||
#define IIO_PATH "/sys/bus/iio/devices/iio:device0/in_voltage%d_raw"
|
// ODROID-C5
|
||||||
|
#define IIO_PATH "/sys/bus/iio/devices/iio:device0/in_voltage%d_input"
|
||||||
|
|
||||||
struct gpio_adc
|
struct gpio_adc
|
||||||
gpio_adc_setup(uint32_t pin)
|
gpio_adc_setup(uint32_t pin)
|
||||||
|
|||||||
Reference in New Issue
Block a user