Chrispy
High-performance multichannel ADC sampling and audio recording.
Loading...
Searching...
No Matches
adc::Channel Struct Reference

Single ADC channel (pin + metadata). More...

#include <Adc.h>

Public Member Functions

 Channel (uint8_t _pin, int8_t _power, bool _active_high)
 Channel constructor.
 
int8_t mux_mask ()
 Gets bit pattern for mux mask to use with ADC for channel.
 

Data Fields

uint8_t pin
 Pin number corresponding to the channel being read.
 
int8_t power
 Power pin.
 
bool active_high
 Boolean for if the power is active high or active high,.
 

Detailed Description

Single ADC channel (pin + metadata).

Constructor & Destructor Documentation

◆ Channel()

adc::Channel::Channel ( uint8_t  _pin,
int8_t  _power,
bool  _active_high 
)
inlineexplicit

Channel constructor.

Assumes no power is required unless otherwise noted.

Parameters
_pinAnalog pin number for channel.
_powerPin number for power.
_active_highFlag indicating if channel is active low or high.

Member Function Documentation

◆ mux_mask()

int8_t adc::Channel::mux_mask ( )
inline

Gets bit pattern for mux mask to use with ADC for channel.

Returns
(int8_t): Bit-mask or ADC mask if successful (>0), negative otherwise.

Field Documentation

◆ active_high

bool adc::Channel::active_high

Boolean for if the power is active high or active high,.

◆ pin

uint8_t adc::Channel::pin

Pin number corresponding to the channel being read.

◆ power

int8_t adc::Channel::power

Power pin.

If negative, indicates no power is needed.


The documentation for this struct was generated from the following files: