oximeter5 2.0.0.0
|
API for configuring and manipulating Oximeter 5 Click driver. More...
Topics | |
Oximeter 5 Registers List | |
List of registers of Oximeter 5 Click driver. | |
Oximeter 5 Registers Settings | |
Settings for registers of Oximeter 5 Click driver. | |
Oximeter 5 MikroBUS Map | |
MikroBUS pin mapping of Oximeter 5 Click driver. | |
Functions | |
void | oximeter5_cfg_setup (oximeter5_cfg_t *cfg) |
Oximeter 5 configuration object setup function. | |
err_t | oximeter5_init (oximeter5_t *ctx, oximeter5_cfg_t *cfg) |
Oximeter 5 initialization function. | |
err_t | oximeter5_default_cfg (oximeter5_t *ctx) |
Oximeter 5 default configuration function. | |
err_t | oximeter5_generic_write (oximeter5_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Oximeter 5 I2C writing function. | |
err_t | oximeter5_generic_read (oximeter5_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Oximeter 5 I2C reading function. | |
uint8_t | oximeter5_check_interrupt (oximeter5_t *ctx) |
Oximeter 5 check interrupt function. | |
err_t | oximeter5_sw_reset (oximeter5_t *ctx) |
Oximeter 5 soft reset function. | |
err_t | oximeter5_read_temperature (oximeter5_t *ctx, float *temperature) |
Oximeter 5 read temperature function. | |
err_t | oximeter5_set_fifo_wr_pointer (oximeter5_t *ctx, uint8_t fifo_wr_p) |
Oximeter 5 set FIFO write pointer function. | |
err_t | oximeter5_set_fifo_rd_pointer (oximeter5_t *ctx, uint8_t fifo_rd_p) |
Oximeter 5 set FIFO read pointer function. | |
err_t | oximeter5_set_fifo_cfg (oximeter5_t *ctx, uint8_t smp_ave, uint8_t fifo_ro_en, uint8_t fifo_a_full) |
Oximeter 5 set FIFO config function. | |
err_t | oximeter5_set_mode_cfg (oximeter5_t *ctx, uint8_t mode) |
Oximeter 5 set mode config function. | |
err_t | oximeter5_set_spo2_cfg (oximeter5_t *ctx, uint8_t spo2_adc_rge, uint8_t spo2_sr, uint8_t led_pw) |
Oximeter 5 set SpO2 config function. | |
err_t | oximeter5_read_sensor_data (oximeter5_t *ctx, uint32_t *ir, uint32_t *red) |
Oximeter 5 get sensor data function. | |
err_t | oximeter5_get_oxygen_saturation (uint32_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint32_t *pun_red_buffer, uint8_t *pn_spo2) |
Oximeter 5 get oxygen saturation function. | |
err_t | oximeter5_get_heart_rate (uint32_t *pun_ir_buffer, int32_t n_ir_buffer_length, uint32_t *pun_red_buffer, int32_t *pn_heart_rate) |
Oximeter 5 get heart rate function. | |
API for configuring and manipulating Oximeter 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void oximeter5_cfg_setup | ( | oximeter5_cfg_t * | cfg | ) |
Oximeter 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See oximeter5_cfg_t object definition for detailed explanation. |
uint8_t oximeter5_check_interrupt | ( | oximeter5_t * | ctx | ) |
Oximeter 5 check interrupt function.
This function get states of the INT pin of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state.err_t oximeter5_default_cfg | ( | oximeter5_t * | ctx | ) |
Oximeter 5 default configuration function.
This function executes a default configuration of Oximeter 5 click board.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t oximeter5_generic_read | ( | oximeter5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Oximeter 5 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t oximeter5_generic_write | ( | oximeter5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Oximeter 5 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t oximeter5_get_heart_rate | ( | uint32_t * | pun_ir_buffer, |
int32_t | n_ir_buffer_length, | ||
uint32_t * | pun_red_buffer, | ||
int32_t * | pn_heart_rate ) |
Oximeter 5 get heart rate function.
This function read heart rate data autoincrements the register address pointer of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | pun_ir_buffer | : IR ADC data buffer pointer. |
[in] | n_ir_buffer_length | : Number of IR ADC data buffer. |
[in] | pun_red_buffer | : IR ADC data buffer pointer. |
[out] | pn_heart_rate | : Heart rate data. |
0
- Success, -1
- Error.err_t oximeter5_get_oxygen_saturation | ( | uint32_t * | pun_ir_buffer, |
int32_t | n_ir_buffer_length, | ||
uint32_t * | pun_red_buffer, | ||
uint8_t * | pn_spo2 ) |
Oximeter 5 get oxygen saturation function.
This function get oxygen saturation data autoincrements the register address pointer of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | pun_ir_buffer | : IR ADC data buffer pointer. |
[in] | n_ir_buffer_length | : Number of IR ADC data buffer. |
[in] | pun_red_buffer | : IR ADC data buffer pointer. |
[out] | pn_spo2 | : SpO2 Oxygen saturation data, from 0 percent to 100 percent. |
0
- Success, -1
- Error.err_t oximeter5_init | ( | oximeter5_t * | ctx, |
oximeter5_cfg_t * | cfg ) |
Oximeter 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See oximeter5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t oximeter5_read_sensor_data | ( | oximeter5_t * | ctx, |
uint32_t * | ir, | ||
uint32_t * | red ) |
Oximeter 5 get sensor data function.
This function read sensor data autoincrements the register address pointer of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[out] | ir | : IR ADC data. |
[out] | red | : Red ADC data. |
0
- Success, -1
- Error.err_t oximeter5_read_temperature | ( | oximeter5_t * | ctx, |
float * | temperature ) |
Oximeter 5 read temperature function.
This function reads a temperature data of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degree Celsius. |
0
- Success, -1
- Error.err_t oximeter5_set_fifo_cfg | ( | oximeter5_t * | ctx, |
uint8_t | smp_ave, | ||
uint8_t | fifo_ro_en, | ||
uint8_t | fifo_a_full ) |
Oximeter 5 set FIFO config function.
This function set FIFO configuration of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | smp_ave | : Sample Averaging data. |
[in] | fifo_ro_en | : FIFO Rolls on Full enable data. |
[in] | fifo_a_full | : FIFO Almost Full Value. |
0
- Success, -1
- Error.err_t oximeter5_set_fifo_rd_pointer | ( | oximeter5_t * | ctx, |
uint8_t | fifo_rd_p ) |
Oximeter 5 set FIFO read pointer function.
This function set FIFO read points to the location of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | fifo_rd_p | : FIFO read pointer points data. |
0
- Success, -1
- Error.err_t oximeter5_set_fifo_wr_pointer | ( | oximeter5_t * | ctx, |
uint8_t | fifo_wr_p ) |
Oximeter 5 set FIFO write pointer function.
This function set FIFO write points to the location of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | fifo_wr_p | : FIFO write pointer points data. |
0
- Success, -1
- Error.err_t oximeter5_set_mode_cfg | ( | oximeter5_t * | ctx, |
uint8_t | mode ) |
Oximeter 5 set mode config function.
This function set mode configuration of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | mode | : Mode Control data. |
0
- Success, -1
- Error.err_t oximeter5_set_spo2_cfg | ( | oximeter5_t * | ctx, |
uint8_t | spo2_adc_rge, | ||
uint8_t | spo2_sr, | ||
uint8_t | led_pw ) |
Oximeter 5 set SpO2 config function.
This function set SpO2 configuration of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
[in] | spo2_adc_rge | : SpO2 ADC Range Control data. |
[in] | spo2_sr | : SpO2 Sample Rate Control data. |
[in] | led_pw | : LED Pulse Width Control and ADC Resolution data. |
0
- Success, -1
- Error.err_t oximeter5_sw_reset | ( | oximeter5_t * | ctx | ) |
Oximeter 5 soft reset function.
This function executes a software reset of the MAX30102 High-Sensitivity Pulse Oximeter and Heart-Rate Sensor for Wearable Health on the Oximeter 5 Click board™.
[in] | ctx | : Click context object. See oximeter5_t object definition for detailed explanation. |
0
- Success, -1
- Error.