9 #define IIO_ANALOG_IN_COUNT 8 10 #define IIO_ANALOG_IN_DIR "/sys/bus/iio/devices/iio:device0/" 12 #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF 14 #define IIO_VOLTAGE_SCALING 0.00142602816 15 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI 16 #define IIO_VOLTAGE_SCALING 3.0*1.8/4095.0 17 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BLUE 18 #define IIO_VOLTAGE_SCALING 1.8/4095.0 19 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_POCKET 20 #define IIO_VOLTAGE_SCALING 3.0*1.8/4095.0 21 #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE 22 #define IIO_VOLTAGE_SCALING 2.0 / 1000 24 #define IIO_VOLTAGE_SCALING 1.0
float voltage_average_ratiometric()
friend class AnalogIn_IIO
int fd_analog_sources[IIO_ANALOG_IN_COUNT]
void set_stop_pin(uint8_t p)
AnalogSource_IIO(int16_t pin, float initial_value, float voltage_scaling)
float board_voltage(void)
#define IIO_ANALOG_IN_COUNT
void set_settle_time(uint16_t settle_time_ms)
void init()
Generic board initialization function.
static const char * analog_sources[]