rtd2
2.0.0.0
|
Functions | |
void | rtd2_cfg_setup (rtd2_cfg_t *cfg) |
Config Object Initialization function. More... | |
err_t | rtd2_init (rtd2_t *ctx, rtd2_cfg_t *cfg) |
Initialization function. More... | |
void | rtd2_default_cfg (rtd2_t *ctx) |
Set default configuration function. More... | |
void | rtd2_hw_reset (rtd2_t *ctx) |
Hardware reset function. More... | |
void | rtd2_toggle_cs (rtd2_t *ctx, uint8_t cs_state) |
Toggle CS pin function. More... | |
void | rtd2_enable_start (rtd2_t *ctx, uint8_t en_start) |
Enable conversion start function. More... | |
uint8_t | rtd2_check_interupt (rtd2_t *ctx) |
Check interrupt status function. More... | |
void | rtd2_send_cmd (rtd2_t *ctx, uint8_t cmd) |
Send command function. More... | |
void | rtd2_set_wakeup (rtd2_t *ctx) |
Set wakeup function. More... | |
void | rtd2_set_sleep (rtd2_t *ctx) |
Set to sleep function. More... | |
void | rtd2_set_sync (rtd2_t *ctx) |
Set sync function. More... | |
void | rtd2_set_reset (rtd2_t *ctx) |
Set reset function. More... | |
void | rtd2_set_read_data_once (rtd2_t *ctx) |
Set read data once function. More... | |
void | rtd2_set_read_data_continuous (rtd2_t *ctx) |
Set read data continuous function. More... | |
void | rtd2_set_stop_data (rtd2_t *ctx) |
Set stop data function. More... | |
void | rtd2_write_continuous (rtd2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
Continuous write the data function. More... | |
void | rtd2_read_continuous (rtd2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
Continuous read the data function. More... | |
void | rtd2_write_reg (rtd2_t *ctx, uint8_t reg, uint8_t tx_data) |
Write the register function. More... | |
uint8_t | rtd2_read_reg (rtd2_t *ctx, uint8_t reg) |
Read the register function. More... | |
uint8_t | rtd2_set_burn_out_source (rtd2_t *ctx, uint8_t burn_out) |
Set burn out source function. More... | |
void | rtd2_set_mux_sel (rtd2_t *ctx, uint8_t adc_pos, uint8_t adc_neg) |
Set multiplexer selection function. More... | |
uint8_t | rtd2_set_bias (rtd2_t *ctx, uint8_t bias) |
Set bias function. More... | |
uint8_t | rtd2_set_int_ref (rtd2_t *ctx, uint8_t s_ref) |
Set int ref function. More... | |
void | rtd2_set_system_monitor (rtd2_t *ctx, uint8_t sys_mon) |
Set system monitor function. More... | |
void | rtd2_set_system_control (rtd2_t *ctx, uint8_t gain, uint8_t output_rate) |
Set system control function. More... | |
void | rtd2_set_idac_current_mag (rtd2_t *ctx, uint8_t c_idac) |
Set IDAC current magnitude function. More... | |
void | rtd2_set_idac_current_out (rtd2_t *ctx, uint8_t c_out_1, uint8_t c_out_2) |
Set IDAC current out function. More... | |
uint8_t | rtd2_check_new_data_ready (rtd2_t *ctx) |
Check new data ready function. More... | |
int32_t | rtd2_read_output_data (rtd2_t *ctx) |
Read output data function. More... | |
float | rtd2_calc_temperature (int32_t adc_val) |
Calculate temperature function. More... | |
float | rtd2_get_temperature (rtd2_t *ctx) |
Get temperature function. More... | |
float rtd2_calc_temperature | ( | int32_t | adc_val | ) |
Calculate temperature function.
ctx | Click object. |
adc_val | 24-bit ( signed ) ADC output data. |
The function calculates the temperature of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_cfg_setup | ( | rtd2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes Click configuration structure to init state.
uint8_t rtd2_check_interupt | ( | rtd2_t * | ctx | ) |
Check interrupt status function.
ctx | Click object. |
The function check interrupt state by return state of the INT pin of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
uint8_t rtd2_check_new_data_ready | ( | rtd2_t * | ctx | ) |
Check new data ready function.
ctx | Click object. |
The function check new data ready of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_default_cfg | ( | rtd2_t * | ctx | ) |
Set default configuration function.
ctx | Click object. |
The function set default configuration of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_enable_start | ( | rtd2_t * | ctx, |
uint8_t | en_start | ||
) |
Enable conversion start function.
ctx | Click object. |
en_start |
|
The function enables ADC conversion of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
float rtd2_get_temperature | ( | rtd2_t * | ctx | ) |
Get temperature function.
ctx | Click object. |
The function read output data and return ambient temperature from the PT100 3-wire temperature probe wired to the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_hw_reset | ( | rtd2_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
The function hardware reset, resets the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
err_t rtd2_init | ( | rtd2_t * | ctx, |
rtd2_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this Click.
void rtd2_read_continuous | ( | rtd2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_bytes | ||
) |
Continuous read the data function.
ctx | Click object. |
reg | 8-bit register address. |
p_rx_data | pointer to the memory location where data be stored. |
n_bytes | number of bytes to be read. |
The function read a sequential data starting from the targeted register address of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
int32_t rtd2_read_output_data | ( | rtd2_t * | ctx | ) |
Read output data function.
ctx | Click object. |
The function read output data of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
uint8_t rtd2_read_reg | ( | rtd2_t * | ctx, |
uint8_t | reg | ||
) |
Read the register function.
ctx | Click object. |
reg | 8-bit register address. |
The function read the data byte of the desired register address of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_send_cmd | ( | rtd2_t * | ctx, |
uint8_t | cmd | ||
) |
Send command function.
ctx | Click object. |
cmd | 8-bit SPI Commands. |
The function sends the command to control the operation of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
uint8_t rtd2_set_bias | ( | rtd2_t * | ctx, |
uint8_t | bias | ||
) |
Set bias function.
ctx | Click object. |
bias |
|
The function set bias voltage of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
uint8_t rtd2_set_burn_out_source | ( | rtd2_t * | ctx, |
uint8_t | burn_out | ||
) |
Set burn out source function.
ctx | Click object. |
burn_out |
|
The function set burn out source of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_idac_current_mag | ( | rtd2_t * | ctx, |
uint8_t | c_idac | ||
) |
Set IDAC current magnitude function.
ctx | Click object. |
c_idac |
|
The function set IDAC excitation current magnitude of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_idac_current_out | ( | rtd2_t * | ctx, |
uint8_t | c_out_1, | ||
uint8_t | c_out_2 | ||
) |
Set IDAC current out function.
ctx | Click object. |
c_out_1 |
|
c_out_2 |
|
The function set IDAC excitation current output 1 and 2, of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
uint8_t rtd2_set_int_ref | ( | rtd2_t * | ctx, |
uint8_t | s_ref | ||
) |
Set int ref function.
ctx | Click object. |
s_ref |
|
The function set internal reference control of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_mux_sel | ( | rtd2_t * | ctx, |
uint8_t | adc_pos, | ||
uint8_t | adc_neg | ||
) |
Set multiplexer selection function.
ctx | Click object. |
adc_pos |
|
adc_neg |
|
The function set multiplexer selection,
set positive and negative input channel selection of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_read_data_continuous | ( | rtd2_t * | ctx | ) |
Set read data continuous function.
ctx | Click object. |
The function set to read data continuous, enables read data continuous mode of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_read_data_once | ( | rtd2_t * | ctx | ) |
Set read data once function.
ctx | Click object. |
The function set to read data once, loads the most recent conversion result into the output register of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_reset | ( | rtd2_t * | ctx | ) |
Set reset function.
ctx | Click object. |
The function set-reset, restores the registers to the respective default values of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_sleep | ( | rtd2_t * | ctx | ) |
Set to sleep function.
ctx | Click object. |
The function set to sleep, places into power-down mode the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_stop_data | ( | rtd2_t * | ctx | ) |
Set stop data function.
ctx | Click object. |
The function set stop data continuous, terminates read data continuous mode of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_sync | ( | rtd2_t * | ctx | ) |
Set sync function.
ctx | Click object. |
The function set sync, resets the ADC digital filter and starts a new conversion of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_system_control | ( | rtd2_t * | ctx, |
uint8_t | gain, | ||
uint8_t | output_rate | ||
) |
Set system control function.
ctx | Click object. |
gain |
|
output_rate |
|
The function set system control of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_system_monitor | ( | rtd2_t * | ctx, |
uint8_t | sys_mon | ||
) |
Set system monitor function.
ctx | Click object. |
sys_mon |
|
The function set system monitor control of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_set_wakeup | ( | rtd2_t * | ctx | ) |
Set wakeup function.
ctx | Click object. |
The function set wakeup, after a sleep, power up the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_toggle_cs | ( | rtd2_t * | ctx, |
uint8_t | cs_state | ||
) |
Toggle CS pin function.
ctx | Click object. |
cs_state |
|
The function toggle CS pin, set CS pin condition of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_write_continuous | ( | rtd2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes | ||
) |
Continuous write the data function.
ctx | Click object. |
reg | 8-bit register address. |
p_tx_data | pointer to the data to be written. |
n_bytes | number of bytes to be written. |
The function writes a sequential data starting from the targeted register address of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.
void rtd2_write_reg | ( | rtd2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_data | ||
) |
Write the register function.
ctx | Click object. |
reg | 8-bit register address. |
tx_data | 8-bit write data. |
The function write the data byte of the desired register address of the 4ADS1247 24-Bit, 2-kSPS, Analog-To-Digital Converters With Programmable Gain Amplifier (PGA) For Sensor Measurement on the RTD 2 Click board.