9#define DSY_ADC_MAX_CHANNELS 16
173 size_t num_channels_;
Handler for analog to digital conversion.
Definition adc.h:91
uint16_t * GetMuxPtr(uint8_t chn, uint8_t idx) const
float GetMuxFloat(uint8_t chn, uint8_t idx) const
~AdcHandle()
Definition adc.h:110
AdcHandle()
Definition adc.h:109
float GetFloat(uint8_t chn) const
void Init(AdcChannelConfig *cfg, size_t num_channels, OverSampling ovs=OVS_32)
uint16_t GetMux(uint8_t chn, uint8_t idx) const
OverSampling
Definition adc.h:95
@ OVS_512
Definition adc.h:104
@ OVS_32
Definition adc.h:100
@ OVS_16
Definition adc.h:99
@ OVS_4
Definition adc.h:97
@ OVS_1024
Definition adc.h:105
@ OVS_128
Definition adc.h:102
@ OVS_LAST
Definition adc.h:106
@ OVS_256
Definition adc.h:103
@ OVS_64
Definition adc.h:101
@ OVS_NONE
Definition adc.h:96
@ OVS_8
Definition adc.h:98
uint16_t Get(uint8_t chn) const
uint16_t * GetPtr(uint8_t chn) const
General Purpose I/O control.
Definition gpio.h:22
Definition leddriver.h:33
Hardware defines and helpers for daisy field platform.
Definition index.h:2
@ PORTX
Definition daisy_core.h:188
Configuration Structure for an ADC Channel.
Definition adc.h:32
void InitMux(Pin adc_pin, size_t mux_channels, Pin mux_0, Pin mux_1=Pin(PORTX, 0), Pin mux_2=Pin(PORTX, 0), ConversionSpeed speed=SPEED_8CYCLES_5)
GPIO pin_
Definition adc.h:81
GPIO mux_pin_[MUX_SEL_LAST]
Definition adc.h:82
void InitSingle(Pin pin, ConversionSpeed speed=SPEED_8CYCLES_5)
ConversionSpeed speed_
Definition adc.h:84
uint8_t mux_channels_
Definition adc.h:83
ConversionSpeed
per channel conversion speed added to fixed time based on bitdepth, etc.
Definition adc.h:44
@ SPEED_1CYCLES_5
Definition adc.h:45
@ SPEED_2CYCLES_5
Definition adc.h:46
@ SPEED_8CYCLES_5
Definition adc.h:47
@ SPEED_387CYCLES_5
Definition adc.h:51
@ SPEED_32CYCLES_5
Definition adc.h:49
@ SPEED_16CYCLES_5
Definition adc.h:48
@ SPEED_810CYCLES_5
Definition adc.h:52
@ SPEED_64CYCLES_5
Definition adc.h:50
MuxPin
Definition adc.h:35
@ MUX_SEL_LAST
Definition adc.h:39
@ MUX_SEL_1
Definition adc.h:37
@ MUX_SEL_0
Definition adc.h:36
@ MUX_SEL_2
Definition adc.h:38
representation of hardware port/pin combination
Definition daisy_core.h:193