Driver of the LTC2499 ADC as found on the power board.
More...
Go to the source code of this file.
|
#define | LTC2499_MAX_VALUE 0x00FFFFFF |
|
#define | LTC2499_MIN_VALUE 0xFF000000 |
|
#define | LTC2499_CH_KEEPPREV 0xFF |
|
|
bool | ltc2499Read (I2C_Device *dev, int addr, int32_t *value, LTC2499Status *result) |
| Reads the LTC ADC at I2C address 'addr'. More...
|
|
bool | ltc2499CfgExt (I2C_Device *dev, int addr, bool diff, uint8_t posCh, LTC2499Filter fltCfg, bool speed2x) |
| Configure LTC2499 with external input. More...
|
|
bool | ltc24499CfgTemp (I2C_Device *dev, int addr, LTC2499Filter fltCfg) |
| Configure LTC2499 for temperature reading. More...
|
|
Driver of the LTC2499 ADC as found on the power board.
Definition in file ltc2499.h.
The status enum, indicating any issues with the value (underflow/overflow).
Enumerator |
---|
ltc2499StatusOk |
Conversion is ok.
|
ltc2499StatusOverFlow |
Overflow.
|
ltc2499StatusUnderFlow |
Underflow.
|
Definition at line 32 of file ltc2499.h.
bool ltc24499CfgTemp |
( |
I2C_Device * |
dev, |
|
|
int |
addr, |
|
|
LTC2499Filter |
fltCfg |
|
) |
| |
Configure LTC2499 for temperature reading.
- Parameters
-
dev | The I2C device |
addr | The I2C address |
fltCfg | Filter configuration. |
- Return values
-
true | No serious errors. |
false | An error occured, check err module for error. |
bool ltc2499CfgExt |
( |
I2C_Device * |
dev, |
|
|
int |
addr, |
|
|
bool |
diff, |
|
|
uint8_t |
posCh, |
|
|
LTC2499Filter |
fltCfg, |
|
|
bool |
speed2x |
|
) |
| |
Configure LTC2499 with external input.
When selecting differential input (diff = true), you only need to specify the positive input channel. The negative input channel is the LSB's bit complement. E.g. selecting channel 0 as positive, means channel 1 is the negative input. When selecting channel as positive input, channel 4 is the negative input. Optionally you can select LTC2499_CH_KEEPPREV to keep the previous channel configuration.
- Parameters
-
dev | The I2C device |
addr | The I2C address |
diff | When true, use differential input |
posCh | Positive input channel, or LTC2499_CH_KEEPPREV. |
fltCfg | Filter configuration |
speed2x | Acquire twice as fast |
- Return values
-
true | No serious errors. |
false | An error occured, check err module for error. |
Definition at line 77 of file ltc2499.c.
Reads the LTC ADC at I2C address 'addr'.
- Parameters
-
dev | The I2C device |
addr | The I2C address |
value | The value as a full-range range 32 bit signed integer. |
status | The conversion status. |
- Return values
-
true | No serious errors. |
false | An error occured, check err module for error. |
Definition at line 41 of file ltc2499.c.