![]() |
LibDriver MAX30102
|
max30102 basic driver modules More...
Data Structures | |
| struct | max30102_handle_s |
| max30102 handle structure definition More... | |
| struct | max30102_info_s |
| max30102 information structure definition More... | |
Typedefs | |
| typedef struct max30102_handle_s | max30102_handle_t |
| max30102 handle structure definition | |
| typedef struct max30102_info_s | max30102_info_t |
| max30102 information structure definition | |
Functions | |
| uint8_t | max30102_info (max30102_info_t *info) |
| get chip's information | |
| uint8_t | max30102_init (max30102_handle_t *handle) |
| initialize the chip | |
| uint8_t | max30102_deinit (max30102_handle_t *handle) |
| close the chip | |
| 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_read_temperature (max30102_handle_t *handle, uint16_t *raw, float *temp) |
| read the temperature | |
| uint8_t | max30102_irq_handler (max30102_handle_t *handle) |
| irq handler | |
| 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_interrupt (max30102_handle_t *handle, max30102_interrupt_t type, max30102_bool_t enable) |
| set the interrupt bool | |
| uint8_t | max30102_get_interrupt (max30102_handle_t *handle, max30102_interrupt_t type, max30102_bool_t *enable) |
| get the interrupt bool | |
| uint8_t | max30102_set_fifo_write_pointer (max30102_handle_t *handle, uint8_t pointer) |
| set the fifo write pointer | |
| uint8_t | max30102_get_fifo_write_pointer (max30102_handle_t *handle, uint8_t *pointer) |
| get the fifo write pointer | |
| uint8_t | max30102_set_fifo_overflow_counter (max30102_handle_t *handle, uint8_t counter) |
| set the fifo overflow counter | |
| uint8_t | max30102_get_fifo_overflow_counter (max30102_handle_t *handle, uint8_t *counter) |
| get the fifo overflow counter | |
| uint8_t | max30102_set_fifo_read_pointer (max30102_handle_t *handle, uint8_t pointer) |
| set the fifo read pointer | |
| uint8_t | max30102_get_fifo_read_pointer (max30102_handle_t *handle, uint8_t *pointer) |
| get the fifo read pointer | |
| uint8_t | max30102_set_fifo_data (max30102_handle_t *handle, uint8_t data) |
| set the fifo data | |
| uint8_t | max30102_get_fifo_data (max30102_handle_t *handle, uint8_t *data) |
| get the fifo data | |
| uint8_t | max30102_set_fifo_sample_averaging (max30102_handle_t *handle, max30102_sample_averaging_t sample) |
| set the fifo sample averaging | |
| uint8_t | max30102_get_fifo_sample_averaging (max30102_handle_t *handle, max30102_sample_averaging_t *sample) |
| get the fifo sample averaging | |
| uint8_t | max30102_set_fifo_roll (max30102_handle_t *handle, max30102_bool_t enable) |
| enable or disable the fifo roll | |
| uint8_t | max30102_get_fifo_roll (max30102_handle_t *handle, max30102_bool_t *enable) |
| get the fifo roll status | |
| uint8_t | max30102_set_fifo_almost_full (max30102_handle_t *handle, uint8_t value) |
| set the fifo almost full value | |
| uint8_t | max30102_get_fifo_almost_full (max30102_handle_t *handle, uint8_t *value) |
| get the fifo almost full value | |
| uint8_t | max30102_set_shutdown (max30102_handle_t *handle, max30102_bool_t enable) |
| set the shutdown | |
| uint8_t | max30102_get_shutdown (max30102_handle_t *handle, max30102_bool_t *enable) |
| get the shutdown | |
| uint8_t | max30102_reset (max30102_handle_t *handle) |
| reset the chip | |
| uint8_t | max30102_set_mode (max30102_handle_t *handle, max30102_mode_t mode) |
| set the mode | |
| uint8_t | max30102_get_mode (max30102_handle_t *handle, max30102_mode_t *mode) |
| get the mode | |
| 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_get_spo2_adc_range (max30102_handle_t *handle, max30102_spo2_adc_range_t *range) |
| get 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_get_spo2_sample_rate (max30102_handle_t *handle, max30102_spo2_sample_rate_t *rate) |
| get the spo2 sample rate | |
| uint8_t | max30102_set_adc_resolution (max30102_handle_t *handle, max30102_adc_resolution_t resolution) |
| set the adc resolution | |
| uint8_t | max30102_get_adc_resolution (max30102_handle_t *handle, max30102_adc_resolution_t *resolution) |
| get the adc resolution | |
| uint8_t | max30102_set_led_red_pulse_amplitude (max30102_handle_t *handle, uint8_t amp) |
| set the red led pulse amplitude | |
| uint8_t | max30102_get_led_red_pulse_amplitude (max30102_handle_t *handle, uint8_t *amp) |
| get the red led pulse amplitude | |
| uint8_t | max30102_set_led_ir_pulse_amplitude (max30102_handle_t *handle, uint8_t amp) |
| set the ir led pulse amplitude | |
| uint8_t | max30102_get_led_ir_pulse_amplitude (max30102_handle_t *handle, uint8_t *amp) |
| get the ir led pulse amplitude | |
| uint8_t | max30102_set_slot (max30102_handle_t *handle, max30102_slot_t slot, max30102_led_t led) |
| set the led slot | |
| uint8_t | max30102_get_slot (max30102_handle_t *handle, max30102_slot_t slot, max30102_led_t *led) |
| get the led slot | |
| uint8_t | max30102_set_die_temperature (max30102_handle_t *handle, max30102_bool_t enable) |
| enable or disable die temperature | |
| uint8_t | max30102_get_die_temperature (max30102_handle_t *handle, max30102_bool_t *enable) |
| get the die temperature status | |
| uint8_t | max30102_get_id (max30102_handle_t *handle, uint8_t *revision_id, uint8_t *part_id) |
| get the chip id | |
max30102 basic driver modules
| typedef struct max30102_handle_s max30102_handle_t |
max30102 handle structure definition
| typedef struct max30102_info_s max30102_info_t |
max30102 information structure definition
max30102 adc resolution enumeration definition
| Enumerator | |
|---|---|
| MAX30102_ADC_RESOLUTION_15_BIT | 15 bits |
| MAX30102_ADC_RESOLUTION_16_BIT | 16 bits |
| MAX30102_ADC_RESOLUTION_17_BIT | 17 bits |
| MAX30102_ADC_RESOLUTION_18_BIT | 18 bits |
Definition at line 143 of file driver_max30102.h.
| enum max30102_bool_t |
max30102 bool enumeration definition
| Enumerator | |
|---|---|
| MAX30102_BOOL_FALSE | false |
| MAX30102_BOOL_TRUE | true |
Definition at line 62 of file driver_max30102.h.
max30102 interrupt status enumeration definition
Definition at line 94 of file driver_max30102.h.
| enum max30102_interrupt_t |
max30102 interrupt enumeration definition
Definition at line 106 of file driver_max30102.h.
| enum max30102_led_t |
max30102 led enumeration definition
| Enumerator | |
|---|---|
| MAX30102_LED_NONE | time slot is disabled |
| MAX30102_LED_RED | enable red |
| MAX30102_LED_IR | enable ir |
Definition at line 154 of file driver_max30102.h.
| enum max30102_mode_t |
max30102 mode enumeration definition
| Enumerator | |
|---|---|
| MAX30102_MODE_HEART_RATE | heart rate mode |
| MAX30102_MODE_SPO2 | spo2 mode |
| MAX30102_MODE_MULTI_LED | multi-led mode |
Definition at line 84 of file driver_max30102.h.
max30102 sample averaging enumeration definition
Definition at line 71 of file driver_max30102.h.
| enum max30102_slot_t |
max30102 slot enumeration definition
| Enumerator | |
|---|---|
| MAX30102_SLOT_1 | slot 1 |
| MAX30102_SLOT_2 | slot 2 |
| MAX30102_SLOT_3 | slot 3 |
| MAX30102_SLOT_4 | slot 4 |
Definition at line 164 of file driver_max30102.h.
max30102 spo2 adc range enumeration definition
| Enumerator | |
|---|---|
| MAX30102_SPO2_ADC_RANGE_2048 | range 2048 |
| MAX30102_SPO2_ADC_RANGE_4096 | range 4096 |
| MAX30102_SPO2_ADC_RANGE_8192 | range 8192 |
| MAX30102_SPO2_ADC_RANGE_16384 | range 16384 |
Definition at line 117 of file driver_max30102.h.
max30102 spo2 sample rate enumeration definition
Definition at line 128 of file driver_max30102.h.
| uint8_t max30102_deinit | ( | max30102_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a max30102 handle structure |
Definition at line 240 of file driver_max30102.c.
| uint8_t max30102_get_adc_resolution | ( | max30102_handle_t * | handle, |
| max30102_adc_resolution_t * | resolution ) |
get the adc resolution
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *resolution | pointer to an adc resolution buffer |
Definition at line 1798 of file driver_max30102.c.
| uint8_t max30102_get_die_temperature | ( | max30102_handle_t * | handle, |
| max30102_bool_t * | enable ) |
get the die temperature status
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2224 of file driver_max30102.c.
| uint8_t max30102_get_fifo_almost_full | ( | max30102_handle_t * | handle, |
| uint8_t * | value ) |
get the fifo almost full value
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *value | pointer to a fifo almost full value buffer |
Definition at line 1344 of file driver_max30102.c.
| uint8_t max30102_get_fifo_data | ( | max30102_handle_t * | handle, |
| uint8_t * | data ) |
get the fifo data
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *data | pointer to a fifo data buffer |
Definition at line 1093 of file driver_max30102.c.
| uint8_t max30102_get_fifo_overflow_counter | ( | max30102_handle_t * | handle, |
| uint8_t * | counter ) |
get the fifo overflow counter
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *counter | pointer to a counter buffer |
Definition at line 940 of file driver_max30102.c.
| uint8_t max30102_get_fifo_read_pointer | ( | max30102_handle_t * | handle, |
| uint8_t * | pointer ) |
get the fifo read pointer
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *pointer | pointer to a pointer buffer |
Definition at line 1021 of file driver_max30102.c.
| uint8_t max30102_get_fifo_roll | ( | max30102_handle_t * | handle, |
| max30102_bool_t * | enable ) |
get the fifo roll status
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1255 of file driver_max30102.c.
| uint8_t max30102_get_fifo_sample_averaging | ( | max30102_handle_t * | handle, |
| max30102_sample_averaging_t * | sample ) |
get the fifo sample averaging
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *sample | pointer to a fifo sample averaging buffer |
Definition at line 1173 of file driver_max30102.c.
| uint8_t max30102_get_fifo_write_pointer | ( | max30102_handle_t * | handle, |
| uint8_t * | pointer ) |
get the fifo write pointer
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *pointer | pointer to a pointer buffer |
Definition at line 859 of file driver_max30102.c.
| uint8_t max30102_get_id | ( | max30102_handle_t * | handle, |
| uint8_t * | revision_id, | ||
| uint8_t * | part_id ) |
get the chip id
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *revision_id | pointer to a revision id buffer |
| [out] | *part_id | pointer to a part id buffer |
Definition at line 2262 of file driver_max30102.c.
| uint8_t max30102_get_interrupt | ( | max30102_handle_t * | handle, |
| max30102_interrupt_t | type, | ||
| max30102_bool_t * | enable ) |
get the interrupt bool
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | type | interrupt type |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 762 of file driver_max30102.c.
| uint8_t max30102_get_interrupt_status | ( | max30102_handle_t * | handle, |
| max30102_interrupt_status_t | status, | ||
| max30102_bool_t * | enable ) |
get the interrupt status
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | status | interrupt status |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 638 of file driver_max30102.c.
| uint8_t max30102_get_led_ir_pulse_amplitude | ( | max30102_handle_t * | handle, |
| uint8_t * | amp ) |
get the ir led pulse amplitude
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *amp | pointer to an ir led pulse amplitude buffer |
Definition at line 1940 of file driver_max30102.c.
| uint8_t max30102_get_led_red_pulse_amplitude | ( | max30102_handle_t * | handle, |
| uint8_t * | amp ) |
get the red led pulse amplitude
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *amp | pointer to a red led pulse amplitude buffer |
Definition at line 1870 of file driver_max30102.c.
| uint8_t max30102_get_mode | ( | max30102_handle_t * | handle, |
| max30102_mode_t * | mode ) |
get the mode
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 1552 of file driver_max30102.c.
| uint8_t max30102_get_shutdown | ( | max30102_handle_t * | handle, |
| max30102_bool_t * | enable ) |
get the shutdown
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1426 of file driver_max30102.c.
| uint8_t max30102_get_slot | ( | max30102_handle_t * | handle, |
| max30102_slot_t | slot, | ||
| max30102_led_t * | led ) |
get the led slot
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | slot | slot number |
| [out] | *led | pointer to a led mode buffer |
Definition at line 2094 of file driver_max30102.c.
| uint8_t max30102_get_spo2_adc_range | ( | max30102_handle_t * | handle, |
| max30102_spo2_adc_range_t * | range ) |
get the spo2 adc range
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *range | pointer to an spo2 adc range buffer |
Definition at line 1634 of file driver_max30102.c.
| uint8_t max30102_get_spo2_sample_rate | ( | max30102_handle_t * | handle, |
| max30102_spo2_sample_rate_t * | rate ) |
get the spo2 sample rate
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *rate | pointer to an spo2 sample rate buffer |
Definition at line 1716 of file driver_max30102.c.
| uint8_t max30102_info | ( | max30102_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a max30102 info structure |
Definition at line 2369 of file driver_max30102.c.
| uint8_t max30102_init | ( | max30102_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a max30102 handle structure |
Definition at line 93 of file driver_max30102.c.
| uint8_t max30102_irq_handler | ( | max30102_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to a max30102 handle structure |
Definition at line 292 of file driver_max30102.c.
| uint8_t max30102_read | ( | max30102_handle_t * | handle, |
| uint32_t * | raw_red, | ||
| uint32_t * | raw_ir, | ||
| uint8_t * | len ) |
read the data
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *raw_red | pointer to a red raw data buffer |
| [out] | *raw_ir | pointer to an ir raw data buffer |
| [in,out] | *len | pointer to a length buffer |
Definition at line 395 of file driver_max30102.c.
| uint8_t max30102_read_temperature | ( | max30102_handle_t * | handle, |
| uint16_t * | raw, | ||
| float * | temp ) |
read the temperature
| [in] | *handle | pointer to a max30102 handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *temp | pointer to a converted temperature buffer |
Definition at line 551 of file driver_max30102.c.
| uint8_t max30102_reset | ( | max30102_handle_t * | handle | ) |
reset the chip
| [in] | *handle | pointer to a max30102 handle structure |
Definition at line 1462 of file driver_max30102.c.
| uint8_t max30102_set_adc_resolution | ( | max30102_handle_t * | handle, |
| max30102_adc_resolution_t | resolution ) |
set the adc resolution
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | resolution | adc resolution |
Definition at line 1753 of file driver_max30102.c.
| uint8_t max30102_set_die_temperature | ( | max30102_handle_t * | handle, |
| max30102_bool_t | enable ) |
enable or disable die temperature
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | enable | bool value |
Definition at line 2179 of file driver_max30102.c.
| uint8_t max30102_set_fifo_almost_full | ( | max30102_handle_t * | handle, |
| uint8_t | value ) |
set the fifo almost full value
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | value | fifo almost full value |
Definition at line 1293 of file driver_max30102.c.
| uint8_t max30102_set_fifo_data | ( | max30102_handle_t * | handle, |
| uint8_t | data ) |
set the fifo data
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | data | fifo data |
Definition at line 1058 of file driver_max30102.c.
| uint8_t max30102_set_fifo_overflow_counter | ( | max30102_handle_t * | handle, |
| uint8_t | counter ) |
set the fifo overflow counter
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | counter | overflow counter |
Definition at line 897 of file driver_max30102.c.
| uint8_t max30102_set_fifo_read_pointer | ( | max30102_handle_t * | handle, |
| uint8_t | pointer ) |
set the fifo read pointer
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | pointer | read pointer |
Definition at line 978 of file driver_max30102.c.
| uint8_t max30102_set_fifo_roll | ( | max30102_handle_t * | handle, |
| max30102_bool_t | enable ) |
enable or disable the fifo roll
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | enable | bool value |
Definition at line 1210 of file driver_max30102.c.
| uint8_t max30102_set_fifo_sample_averaging | ( | max30102_handle_t * | handle, |
| max30102_sample_averaging_t | sample ) |
set the fifo sample averaging
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | sample | fifo sample averaging |
Definition at line 1128 of file driver_max30102.c.
| uint8_t max30102_set_fifo_write_pointer | ( | max30102_handle_t * | handle, |
| uint8_t | pointer ) |
set the fifo write pointer
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | pointer | written pointer |
Definition at line 816 of file driver_max30102.c.
| uint8_t max30102_set_interrupt | ( | max30102_handle_t * | handle, |
| max30102_interrupt_t | type, | ||
| max30102_bool_t | enable ) |
set the interrupt bool
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | type | interrupt type |
| [in] | enable | bool value |
Definition at line 692 of file driver_max30102.c.
| uint8_t max30102_set_led_ir_pulse_amplitude | ( | max30102_handle_t * | handle, |
| uint8_t | amp ) |
set the ir led pulse amplitude
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | amp | ir led pulse amplitude |
Definition at line 1905 of file driver_max30102.c.
| uint8_t max30102_set_led_red_pulse_amplitude | ( | max30102_handle_t * | handle, |
| uint8_t | amp ) |
set the red led pulse amplitude
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | amp | red led pulse amplitude |
Definition at line 1835 of file driver_max30102.c.
| uint8_t max30102_set_mode | ( | max30102_handle_t * | handle, |
| max30102_mode_t | mode ) |
set the mode
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | mode | chip mode |
Definition at line 1507 of file driver_max30102.c.
| uint8_t max30102_set_shutdown | ( | max30102_handle_t * | handle, |
| max30102_bool_t | enable ) |
set the shutdown
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | enable | bool value |
Definition at line 1381 of file driver_max30102.c.
| uint8_t max30102_set_slot | ( | max30102_handle_t * | handle, |
| max30102_slot_t | slot, | ||
| max30102_led_t | led ) |
set the led slot
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | slot | slot number |
| [in] | led | led mode |
Definition at line 1976 of file driver_max30102.c.
| uint8_t max30102_set_spo2_adc_range | ( | max30102_handle_t * | handle, |
| max30102_spo2_adc_range_t | range ) |
set the spo2 adc range
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | range | spo2 adc range |
Definition at line 1589 of file driver_max30102.c.
| uint8_t max30102_set_spo2_sample_rate | ( | max30102_handle_t * | handle, |
| max30102_spo2_sample_rate_t | rate ) |
set the spo2 sample rate
| [in] | *handle | pointer to a max30102 handle structure |
| [in] | rate | spo2 sample rate |
Definition at line 1671 of file driver_max30102.c.