MAX116XX ADC driver function declarations.
More...
#include "mmc_error.h"
#include "port.h"
Go to the source code of this file.
|
enum | max116xx_ref_sel {
MAX116XX_REF_VDD = 0b0000000
, MAX116XX_REF_EXT = 0b0100000
, MAX116XX_REF_INT_OFF = 0b1000000
, MAX116XX_REF_INT_ON = 0b1010000
,
MAX116XX_REF_INT_OFF_OUT = 0b1100000
, MAX116XX_REF_INT_ON_OUT = 0b1110000
} |
| MAX11606-MAX11611 reference selection enum. More...
|
|
enum | max116xx_clk_sel { MAX116XX_CLK_INT = 0b0000
, MAX116XX_CLK_EXT = 0b1000
} |
|
enum | max116xx_pol_sel { MAX116XX_UNIPOLAR = 0b000
, MAX116XX_BIPOLAR = 0b100
} |
|
enum | max116xx_scan_mode { MAX116XX_SCAN_FROM_AIN0 = 0b000000
, MAX116XX_SCAN_OFF = 0b010000
, MAX116XX_SCAN_UPPER = 0b100000
, MAX116XX_SCAN_OFF_SINGLE_CONV = 0b110000
} |
|
enum | max116xx_diff_mode { MAX116XX_DIFFERENTIAL = 0
, MAX116XX_SINGLE_ENDED = 1
} |
|
MAX116XX ADC driver function declarations.
- Author
- Augusto Fraga Giachero augus.nosp@m.to.f.nosp@m.raga@.nosp@m.cnpe.nosp@m.m.br
◆ max116xx_clk_sel
Enumerator |
---|
MAX116XX_CLK_INT | |
MAX116XX_CLK_EXT | |
◆ max116xx_diff_mode
Enumerator |
---|
MAX116XX_DIFFERENTIAL | |
MAX116XX_SINGLE_ENDED | |
◆ max116xx_pol_sel
Enumerator |
---|
MAX116XX_UNIPOLAR | |
MAX116XX_BIPOLAR | |
◆ max116xx_ref_sel
MAX11606-MAX11611 reference selection enum.
Enumerator |
---|
MAX116XX_REF_VDD | |
MAX116XX_REF_EXT | |
MAX116XX_REF_INT_OFF | |
MAX116XX_REF_INT_ON | |
MAX116XX_REF_INT_OFF_OUT | |
MAX116XX_REF_INT_ON_OUT | |
◆ max116xx_scan_mode
Enumerator |
---|
MAX116XX_SCAN_FROM_AIN0 | |
MAX116XX_SCAN_OFF | |
MAX116XX_SCAN_UPPER | |
MAX116XX_SCAN_OFF_SINGLE_CONV | |
◆ max116xx_read_bip()
mmc_err max116xx_read_bip |
( |
uint8_t | chip_id, |
|
|
int16_t | data[], |
|
|
uint8_t | samples ) |
Convert and read single or multiple channels, bipolar mode.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[out] | data | Array containing the samples, -512 - +511 range |
[in] | samples | Number of samples requested |
- Returns
- MMC_OK if success, an error code otherwise
◆ max116xx_read_uni()
mmc_err max116xx_read_uni |
( |
uint8_t | chip_id, |
|
|
int16_t | data[], |
|
|
uint8_t | samples ) |
Convert and read single or multiple channels, unipolar mode.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[out] | data | Array containing the samples, 0 - +1023 range |
[in] | samples | Number of samples requested |
- Returns
- MMC_OK if success, an error code otherwise
◆ max116xx_set_config()
Configure the MAX11606-MAX11611 ADC.
- Parameters
-
[in] | chip_id | Chip ID to communicate |
[in] | cfg | max116xx_cfg struct with the current configuration |
- Returns
- MMC_OK if success, an error code otherwise