KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
MAX123x multichannel ADC driver. More...
Go to the source code of this file.
Functions | |
bool | max123xSetup (I2C_Device *dev, i2cAddr addr, int ref, bool extclk, bool bipolar) |
Writes the setup register of the MAX123x. More... | |
bool | max123xScanUpTo (I2C_Device *dev, i2cAddr addr, int upToCh, uint16_t *results) |
Scan from analog input up to a given channel. More... | |
bool | max123xConvert (I2C_Device *dev, i2cAddr addr, int ch, uint16_t *result) |
Performs a single conversion of a specific channel. More... | |
MAX123x multichannel ADC driver.
Definition in file max123x.h.
bool max123xConvert | ( | I2C_Device * | dev, |
i2cAddr | addr, | ||
int | ch, | ||
uint16_t * | result | ||
) |
bool max123xScanUpTo | ( | I2C_Device * | dev, |
i2cAddr | addr, | ||
int | upToCh, | ||
uint16_t * | results | ||
) |
Scan from analog input up to a given channel.
Results will be stored in 'results' array.
dev | The I2C device. |
addr | The I2C component register |
upToCh | The last channel to convert (e.g. 3 will scan channel 0 to 3). |
results | Results array, must be enough to include no. of channels. |
true | Success |
false | Failure, check error module for error. |
bool max123xSetup | ( | I2C_Device * | dev, |
i2cAddr | addr, | ||
int | ref, | ||
bool | extclk, | ||
bool | bipolar | ||
) |
Writes the setup register of the MAX123x.
dev | The I2C device |
addr | The I2C component address |
ref | Reference voltage setup |
extclk | Use external clock |
bipolar | Bipolar mode (+/- 1/2 Vref, else its 0-Vref.) |
true | Success |
false | Failure, check error module for error. |