rtd2 2.0.0.0
|
Functions | |
void | rtd2_cfg_setup (rtd2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | rtd2_init (rtd2_t *ctx, rtd2_cfg_t *cfg) |
Initialization function. | |
void | rtd2_default_cfg (rtd2_t *ctx) |
Set default configuration function. | |
void | rtd2_hw_reset (rtd2_t *ctx) |
Hardware reset function. | |
void | rtd2_toggle_cs (rtd2_t *ctx, uint8_t cs_state) |
Toggle CS pin function. | |
void | rtd2_enable_start (rtd2_t *ctx, uint8_t en_start) |
Enable conversion start function. | |
uint8_t | rtd2_check_interupt (rtd2_t *ctx) |
Check interrupt status function. | |
void | rtd2_send_cmd (rtd2_t *ctx, uint8_t cmd) |
Send command function. | |
void | rtd2_set_wakeup (rtd2_t *ctx) |
Set wakeup function. | |
void | rtd2_set_sleep (rtd2_t *ctx) |
Set to sleep function. | |
void | rtd2_set_sync (rtd2_t *ctx) |
Set sync function. | |
void | rtd2_set_reset (rtd2_t *ctx) |
Set reset function. | |
void | rtd2_set_read_data_once (rtd2_t *ctx) |
Set read data once function. | |
void | rtd2_set_read_data_continuous (rtd2_t *ctx) |
Set read data continuous function. | |
void | rtd2_set_stop_data (rtd2_t *ctx) |
Set stop data function. | |
void | rtd2_write_continuous (rtd2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
Continuous write the data function. | |
void | rtd2_read_continuous (rtd2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
Continuous read the data function. | |
void | rtd2_write_reg (rtd2_t *ctx, uint8_t reg, uint8_t tx_data) |
Write the register function. | |
uint8_t | rtd2_read_reg (rtd2_t *ctx, uint8_t reg) |
Read the register function. | |
uint8_t | rtd2_set_burn_out_source (rtd2_t *ctx, uint8_t burn_out) |
Set burn out source function. | |
void | rtd2_set_mux_sel (rtd2_t *ctx, uint8_t adc_pos, uint8_t adc_neg) |
Set multiplexer selection function. | |
uint8_t | rtd2_set_bias (rtd2_t *ctx, uint8_t bias) |
Set bias function. | |
uint8_t | rtd2_set_int_ref (rtd2_t *ctx, uint8_t s_ref) |
Set int ref function. | |
void | rtd2_set_system_monitor (rtd2_t *ctx, uint8_t sys_mon) |
Set system monitor function. | |
void | rtd2_set_system_control (rtd2_t *ctx, uint8_t gain, uint8_t output_rate) |
Set system control function. | |
void | rtd2_set_idac_current_mag (rtd2_t *ctx, uint8_t c_idac) |
Set IDAC current magnitude function. | |
void | rtd2_set_idac_current_out (rtd2_t *ctx, uint8_t c_out_1, uint8_t c_out_2) |
Set IDAC current out function. | |
uint8_t | rtd2_check_new_data_ready (rtd2_t *ctx) |
Check new data ready function. | |
int32_t | rtd2_read_output_data (rtd2_t *ctx) |
Read output data function. | |
float | rtd2_calc_temperature (int32_t adc_val) |
Calculate temperature function. | |
float | rtd2_get_temperature (rtd2_t *ctx) |
Get temperature function. | |
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. |
1 : Active.
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. |
0x01 ( RTD2_NEW_DATA_IS_READY ) : New data is ready.
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 |
|
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 |
|
0x01 ( RTD2_SUCESS ): Sucess.
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 |
|
0x01 ( RTD2_SUCESS ): Sucess.
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 |
|
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 |
|
uint8_t rtd2_set_int_ref | ( | rtd2_t * | ctx, |
uint8_t | s_ref ) |
Set int ref function.
ctx | Click object. |
s_ref |
|
0x01 ( RTD2_SUCESS ): Sucess.
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 |
|
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 |
|
void rtd2_set_system_monitor | ( | rtd2_t * | ctx, |
uint8_t | sys_mon ) |
Set system monitor function.
ctx | Click object. |
sys_mon |
|
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 |
|
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.