40static volatile uint8_t gs_flag;
41static uint32_t gs_raw_red[32];
42static uint32_t gs_raw_ir[32];
69static void a_max30102_interface_test_receive_callback(uint8_t type)
80 res =
max30102_read(&gs_handle, (uint32_t *)gs_raw_red, (uint32_t *)gs_raw_ir, (uint8_t *)&len);
driver max30102 fifo test header file
uint8_t max30102_set_slot(max30102_handle_t *handle, max30102_slot_t slot, max30102_led_t led)
set the led slot
uint8_t max30102_set_die_temperature(max30102_handle_t *handle, max30102_bool_t enable)
enable or disable die temperature
max30102_bool_t
max30102 bool enumeration definition
uint8_t max30102_set_fifo_roll(max30102_handle_t *handle, max30102_bool_t enable)
enable or disable the fifo roll
uint8_t max30102_get_interrupt_status(max30102_handle_t *handle, max30102_interrupt_status_t status, max30102_bool_t *enable)
get the interrupt status
uint8_t max30102_set_fifo_almost_full(max30102_handle_t *handle, uint8_t value)
set the fifo almost full value
uint8_t max30102_info(max30102_info_t *info)
get chip's information
uint8_t max30102_set_fifo_sample_averaging(max30102_handle_t *handle, max30102_sample_averaging_t sample)
set the fifo sample averaging
uint8_t max30102_read_temperature(max30102_handle_t *handle, uint16_t *raw, float *temp)
read the temperature
uint8_t max30102_set_led_red_pulse_amplitude(max30102_handle_t *handle, uint8_t amp)
set the red led pulse amplitude
uint8_t max30102_set_mode(max30102_handle_t *handle, max30102_mode_t mode)
set the mode
uint8_t max30102_set_shutdown(max30102_handle_t *handle, max30102_bool_t enable)
set the shutdown
uint8_t max30102_read(max30102_handle_t *handle, uint32_t *raw_red, uint32_t *raw_ir, uint8_t *len)
read the data
uint8_t max30102_deinit(max30102_handle_t *handle)
close the chip
uint8_t max30102_set_spo2_adc_range(max30102_handle_t *handle, max30102_spo2_adc_range_t range)
set the spo2 adc range
uint8_t max30102_set_spo2_sample_rate(max30102_handle_t *handle, max30102_spo2_sample_rate_t rate)
set the spo2 sample rate
uint8_t max30102_set_interrupt(max30102_handle_t *handle, max30102_interrupt_t type, max30102_bool_t enable)
set the interrupt bool
uint8_t max30102_set_led_ir_pulse_amplitude(max30102_handle_t *handle, uint8_t amp)
set the ir led pulse amplitude
struct max30102_info_s max30102_info_t
max30102 information structure definition
uint8_t max30102_init(max30102_handle_t *handle)
initialize the chip
struct max30102_handle_s max30102_handle_t
max30102 handle structure definition
uint8_t max30102_irq_handler(max30102_handle_t *handle)
irq handler
uint8_t max30102_set_adc_resolution(max30102_handle_t *handle, max30102_adc_resolution_t resolution)
set the adc resolution
@ MAX30102_SPO2_ADC_RANGE_4096
@ MAX30102_INTERRUPT_DIE_TEMP_RDY_EN
@ MAX30102_INTERRUPT_PPG_RDY_EN
@ MAX30102_INTERRUPT_FIFO_FULL_EN
@ MAX30102_INTERRUPT_ALC_OVF_EN
@ MAX30102_SPO2_SAMPLE_RATE_100_HZ
@ MAX30102_SAMPLE_AVERAGING_8
@ MAX30102_INTERRUPT_STATUS_FIFO_FULL
@ MAX30102_INTERRUPT_STATUS_ALC_OVF
@ MAX30102_INTERRUPT_STATUS_DIE_TEMP_RDY
@ MAX30102_INTERRUPT_STATUS_PPG_RDY
@ MAX30102_INTERRUPT_STATUS_PWR_RDY
@ MAX30102_ADC_RESOLUTION_18_BIT
uint8_t max30102_interface_iic_init(void)
interface iic bus init
void max30102_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t max30102_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t max30102_interface_iic_deinit(void)
interface iic bus deinit
void max30102_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t max30102_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
#define DRIVER_MAX30102_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_MAX30102_LINK_INIT(HANDLE, STRUCTURE)
initialize max30102_handle_t structure
#define DRIVER_MAX30102_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_MAX30102_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_MAX30102_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_MAX30102_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_MAX30102_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_MAX30102_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
uint8_t max30102_fifo_test(uint32_t times)
fifo test
uint8_t max30102_fifo_test_irq_handler(void)
fifo test irq handler
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v