LibDriver MAX30105
Loading...
Searching...
No Matches
max30105 basic driver function

max30105 basic driver modules More...

Collaboration diagram for max30105 basic driver function:

Data Structures

struct  max30105_handle_s
 max30105 handle structure definition More...
struct  max30105_info_s
 max30105 information structure definition More...

Typedefs

typedef struct max30105_handle_s max30105_handle_t
 max30105 handle structure definition
typedef struct max30105_info_s max30105_info_t
 max30105 information structure definition

Enumerations

enum  max30105_bool_t { MAX30105_BOOL_FALSE = 0x00 , MAX30105_BOOL_TRUE = 0x01 }
 max30105 bool enumeration definition More...
enum  max30105_sample_averaging_t {
  MAX30105_SAMPLE_AVERAGING_1 = 0x00 , MAX30105_SAMPLE_AVERAGING_2 = 0x01 , MAX30105_SAMPLE_AVERAGING_4 = 0x02 , MAX30105_SAMPLE_AVERAGING_8 = 0x03 ,
  MAX30105_SAMPLE_AVERAGING_16 = 0x04 , MAX30105_SAMPLE_AVERAGING_32 = 0x05
}
 max30105 sample averaging enumeration definition More...
enum  max30105_mode_t { MAX30105_MODE_RED = 0x02 , MAX30105_MODE_RED_IR = 0x03 , MAX30105_MODE_GREEN_RED_IR = 0x07 }
 max30105 mode enumeration definition More...
enum  max30105_interrupt_status_t {
  MAX30105_INTERRUPT_STATUS_FIFO_FULL = 7 , MAX30105_INTERRUPT_STATUS_DATA_RDY = 6 , MAX30105_INTERRUPT_STATUS_ALC_OVF = 5 , MAX30105_INTERRUPT_STATUS_PROX_INT = 4 ,
  MAX30105_INTERRUPT_STATUS_PWR_RDY = 0 , MAX30105_INTERRUPT_STATUS_DIE_TEMP_RDY = 1
}
 max30105 interrupt status enumeration definition More...
enum  max30105_interrupt_t {
  MAX30105_INTERRUPT_FIFO_FULL_EN = 7 , MAX30105_INTERRUPT_DATA_RDY_EN = 6 , MAX30105_INTERRUPT_ALC_OVF_EN = 5 , MAX30105_INTERRUPT_PROX_INT_EN = 4 ,
  MAX30105_INTERRUPT_DIE_TEMP_RDY_EN = 1
}
 max30105 interrupt enumeration definition More...
enum  max30105_particle_sensing_adc_range_t { MAX30105_PARTICLE_SENSING_ADC_RANGE_2048 = 0 , MAX30105_PARTICLE_SENSING_ADC_RANGE_4096 = 1 , MAX30105_PARTICLE_SENSING_ADC_RANGE_8192 = 2 , MAX30105_PARTICLE_SENSING_ADC_RANGE_16384 = 3 }
 max30105 particle sensing adc range enumeration definition More...
enum  max30105_particle_sensing_sample_rate_t {
  MAX30105_PARTICLE_SENSING_SAMPLE_RATE_50_HZ = 0 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_100_HZ = 1 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_200_HZ = 2 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_400_HZ = 3 ,
  MAX30105_PARTICLE_SENSING_SAMPLE_RATE_800_HZ = 4 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_1000_HZ = 5 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_1600_HZ = 6 , MAX30105_PARTICLE_SENSING_SAMPLE_RATE_3200_HZ = 7
}
 max30105 particle sensing sample rate enumeration definition More...
enum  max30105_adc_resolution_t { MAX30105_ADC_RESOLUTION_15_BIT = 0 , MAX30105_ADC_RESOLUTION_16_BIT = 1 , MAX30105_ADC_RESOLUTION_17_BIT = 2 , MAX30105_ADC_RESOLUTION_18_BIT = 3 }
 max30105 adc resolution enumeration definition More...
enum  max30105_led_t {
  MAX30105_LED_NONE = 0 , MAX30105_LED_RED_LED1_PA = 1 , MAX30105_LED_IR_LED2_PA = 2 , MAX30105_LED_GREEN_LED3_PA = 3 ,
  MAX30105_LED_RED_PILOT_PA = 5 , MAX30105_LED_IR_PILOT_PA = 6 , MAX30105_LED_GREEN_PILOT_PA = 7
}
 max30105 led enumeration definition More...
enum  max30105_slot_t { MAX30105_SLOT_1 = 0 , MAX30105_SLOT_2 = 1 , MAX30105_SLOT_3 = 2 , MAX30105_SLOT_4 = 3 }
 max30105 slot enumeration definition More...

Functions

uint8_t max30105_info (max30105_info_t *info)
 get chip's information
uint8_t max30105_irq_handler (max30105_handle_t *handle)
 irq handler
uint8_t max30105_init (max30105_handle_t *handle)
 initialize the chip
uint8_t max30105_deinit (max30105_handle_t *handle)
 close the chip
uint8_t max30105_read (max30105_handle_t *handle, uint32_t *raw_red, uint32_t *raw_ir, uint32_t *raw_green, uint8_t *len)
 read the data
uint8_t max30105_read_temperature (max30105_handle_t *handle, uint16_t *raw, float *temp)
 read the temperature
uint8_t max30105_get_interrupt_status (max30105_handle_t *handle, max30105_interrupt_status_t status, max30105_bool_t *enable)
 get the interrupt status
uint8_t max30105_set_interrupt (max30105_handle_t *handle, max30105_interrupt_t type, max30105_bool_t enable)
 set the interrupt bool
uint8_t max30105_get_interrupt (max30105_handle_t *handle, max30105_interrupt_t type, max30105_bool_t *enable)
 get the interrupt bool
uint8_t max30105_set_fifo_write_pointer (max30105_handle_t *handle, uint8_t pointer)
 set the fifo write pointer
uint8_t max30105_get_fifo_write_pointer (max30105_handle_t *handle, uint8_t *pointer)
 get the fifo write pointer
uint8_t max30105_set_fifo_overflow_counter (max30105_handle_t *handle, uint8_t counter)
 set the fifo overflow counter
uint8_t max30105_get_fifo_overflow_counter (max30105_handle_t *handle, uint8_t *counter)
 get the fifo overflow counter
uint8_t max30105_set_fifo_read_pointer (max30105_handle_t *handle, uint8_t pointer)
 set the fifo read pointer
uint8_t max30105_get_fifo_read_pointer (max30105_handle_t *handle, uint8_t *pointer)
 get the fifo read pointer
uint8_t max30105_set_fifo_data (max30105_handle_t *handle, uint8_t data)
 set the fifo data
uint8_t max30105_get_fifo_data (max30105_handle_t *handle, uint8_t *data)
 get the fifo data
uint8_t max30105_set_fifo_sample_averaging (max30105_handle_t *handle, max30105_sample_averaging_t sample)
 set the fifo sample averaging
uint8_t max30105_get_fifo_sample_averaging (max30105_handle_t *handle, max30105_sample_averaging_t *sample)
 get the fifo sample averaging
uint8_t max30105_set_fifo_roll (max30105_handle_t *handle, max30105_bool_t enable)
 enable or disable the fifo roll
uint8_t max30105_get_fifo_roll (max30105_handle_t *handle, max30105_bool_t *enable)
 get the fifo roll status
uint8_t max30105_set_fifo_almost_full (max30105_handle_t *handle, uint8_t value)
 set the fifo almost full value
uint8_t max30105_get_fifo_almost_full (max30105_handle_t *handle, uint8_t *value)
 get the fifo almost full value
uint8_t max30105_set_shutdown (max30105_handle_t *handle, max30105_bool_t enable)
 set the shutdown
uint8_t max30105_get_shutdown (max30105_handle_t *handle, max30105_bool_t *enable)
 get the shutdown
uint8_t max30105_reset (max30105_handle_t *handle)
 reset the chip
uint8_t max30105_set_mode (max30105_handle_t *handle, max30105_mode_t mode)
 set the mode
uint8_t max30105_get_mode (max30105_handle_t *handle, max30105_mode_t *mode)
 get the mode
uint8_t max30105_set_particle_sensing_adc_range (max30105_handle_t *handle, max30105_particle_sensing_adc_range_t range)
 set the particle sensing adc range
uint8_t max30105_get_particle_sensing_adc_range (max30105_handle_t *handle, max30105_particle_sensing_adc_range_t *range)
 get the particle sensing adc range
uint8_t max30105_set_particle_sensing_sample_rate (max30105_handle_t *handle, max30105_particle_sensing_sample_rate_t rate)
 set the particle sensing sample rate
uint8_t max30105_get_particle_sensing_sample_rate (max30105_handle_t *handle, max30105_particle_sensing_sample_rate_t *rate)
 get the particle sensing sample rate
uint8_t max30105_set_adc_resolution (max30105_handle_t *handle, max30105_adc_resolution_t resolution)
 set the adc resolution
uint8_t max30105_get_adc_resolution (max30105_handle_t *handle, max30105_adc_resolution_t *resolution)
 get the adc resolution
uint8_t max30105_set_led_red_pulse_amplitude (max30105_handle_t *handle, uint8_t amp)
 set the red led pulse amplitude
uint8_t max30105_get_led_red_pulse_amplitude (max30105_handle_t *handle, uint8_t *amp)
 get the red led pulse amplitude
uint8_t max30105_set_led_ir_pulse_amplitude (max30105_handle_t *handle, uint8_t amp)
 set the ir led pulse amplitude
uint8_t max30105_get_led_ir_pulse_amplitude (max30105_handle_t *handle, uint8_t *amp)
 get the ir led pulse amplitude
uint8_t max30105_set_led_green_pulse_amplitude (max30105_handle_t *handle, uint8_t amp)
 set the green led pulse amplitude
uint8_t max30105_get_led_green_pulse_amplitude (max30105_handle_t *handle, uint8_t *amp)
 get the green led pulse amplitude
uint8_t max30105_set_led_proximity_pulse_amplitude (max30105_handle_t *handle, uint8_t amp)
 set the proximity led pulse amplitude
uint8_t max30105_get_led_proximity_pulse_amplitude (max30105_handle_t *handle, uint8_t *amp)
 get the proximity led pulse amplitude
uint8_t max30105_set_slot (max30105_handle_t *handle, max30105_slot_t slot, max30105_led_t led)
 set the led slot
uint8_t max30105_get_slot (max30105_handle_t *handle, max30105_slot_t slot, max30105_led_t *led)
 get the led slot
uint8_t max30105_set_die_temperature (max30105_handle_t *handle, max30105_bool_t enable)
 enable or disable die temperature
uint8_t max30105_get_die_temperature (max30105_handle_t *handle, max30105_bool_t *enable)
 get the die temperature status
uint8_t max30105_set_proximity_interrupt_threshold (max30105_handle_t *handle, uint8_t threshold)
 set the proximity interrupt threshold
uint8_t max30105_get_proximity_interrupt_threshold (max30105_handle_t *handle, uint8_t *threshold)
 get the proximity interrupt threshold
uint8_t max30105_proximity_threshold_convert_to_register (max30105_handle_t *handle, uint32_t adc, uint8_t *reg)
 convert the proximity threshold to the register raw data
uint8_t max30105_proximity_threshold_convert_to_data (max30105_handle_t *handle, uint8_t reg, uint32_t *adc)
 convert the register raw data to the proximity threshold
uint8_t max30105_get_id (max30105_handle_t *handle, uint8_t *revision_id, uint8_t *part_id)
 get the chip id

Detailed Description

max30105 basic driver modules

Typedef Documentation

◆ max30105_handle_t

max30105 handle structure definition

◆ max30105_info_t

max30105 information structure definition

Enumeration Type Documentation

◆ max30105_adc_resolution_t

max30105 adc resolution enumeration definition

Enumerator
MAX30105_ADC_RESOLUTION_15_BIT 

15 bits

MAX30105_ADC_RESOLUTION_16_BIT 

16 bits

MAX30105_ADC_RESOLUTION_17_BIT 

17 bits

MAX30105_ADC_RESOLUTION_18_BIT 

18 bits

Definition at line 145 of file driver_max30105.h.

◆ max30105_bool_t

max30105 bool enumeration definition

Enumerator
MAX30105_BOOL_FALSE 

false

MAX30105_BOOL_TRUE 

true

Definition at line 62 of file driver_max30105.h.

◆ max30105_interrupt_status_t

max30105 interrupt status enumeration definition

Enumerator
MAX30105_INTERRUPT_STATUS_FIFO_FULL 

fifo almost full flag

MAX30105_INTERRUPT_STATUS_DATA_RDY 

new fifo data ready

MAX30105_INTERRUPT_STATUS_ALC_OVF 

ambient light cancellation overflow

MAX30105_INTERRUPT_STATUS_PROX_INT 

proximity threshold triggered

MAX30105_INTERRUPT_STATUS_PWR_RDY 

power ready flag

MAX30105_INTERRUPT_STATUS_DIE_TEMP_RDY 

internal temperature ready flag

Definition at line 94 of file driver_max30105.h.

◆ max30105_interrupt_t

max30105 interrupt enumeration definition

Enumerator
MAX30105_INTERRUPT_FIFO_FULL_EN 

fifo almost full enable

MAX30105_INTERRUPT_DATA_RDY_EN 

new fifo data ready enable

MAX30105_INTERRUPT_ALC_OVF_EN 

ambient light cancellation overflow enable

MAX30105_INTERRUPT_PROX_INT_EN 

proximity threshold interrupt enable

MAX30105_INTERRUPT_DIE_TEMP_RDY_EN 

internal temperature enable

Definition at line 107 of file driver_max30105.h.

◆ max30105_led_t

max30105 led enumeration definition

Enumerator
MAX30105_LED_NONE 

time slot is disabled

MAX30105_LED_RED_LED1_PA 

red led1 pa

MAX30105_LED_IR_LED2_PA 

ir led2 pa

MAX30105_LED_GREEN_LED3_PA 

green led3 pa

MAX30105_LED_RED_PILOT_PA 

red pilot pa

MAX30105_LED_IR_PILOT_PA 

ir pilot pa

MAX30105_LED_GREEN_PILOT_PA 

green pilot pa

Definition at line 156 of file driver_max30105.h.

◆ max30105_mode_t

max30105 mode enumeration definition

Enumerator
MAX30105_MODE_RED 

red only mode

MAX30105_MODE_RED_IR 

red and ir mode

MAX30105_MODE_GREEN_RED_IR 

green, red and ir mode

Definition at line 84 of file driver_max30105.h.

◆ max30105_particle_sensing_adc_range_t

max30105 particle sensing adc range enumeration definition

Enumerator
MAX30105_PARTICLE_SENSING_ADC_RANGE_2048 

range 2048

MAX30105_PARTICLE_SENSING_ADC_RANGE_4096 

range 4096

MAX30105_PARTICLE_SENSING_ADC_RANGE_8192 

range 8192

MAX30105_PARTICLE_SENSING_ADC_RANGE_16384 

range 16384

Definition at line 119 of file driver_max30105.h.

◆ max30105_particle_sensing_sample_rate_t

max30105 particle sensing sample rate enumeration definition

Enumerator
MAX30105_PARTICLE_SENSING_SAMPLE_RATE_50_HZ 

50Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_100_HZ 

100Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_200_HZ 

200Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_400_HZ 

400Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_800_HZ 

800Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_1000_HZ 

1000Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_1600_HZ 

1600Hz

MAX30105_PARTICLE_SENSING_SAMPLE_RATE_3200_HZ 

3200Hz

Definition at line 130 of file driver_max30105.h.

◆ max30105_sample_averaging_t

max30105 sample averaging enumeration definition

Enumerator
MAX30105_SAMPLE_AVERAGING_1 

no averaging

MAX30105_SAMPLE_AVERAGING_2 

averaging 2

MAX30105_SAMPLE_AVERAGING_4 

averaging 4

MAX30105_SAMPLE_AVERAGING_8 

averaging 8

MAX30105_SAMPLE_AVERAGING_16 

averaging 16

MAX30105_SAMPLE_AVERAGING_32 

averaging 32

Definition at line 71 of file driver_max30105.h.

◆ max30105_slot_t

max30105 slot enumeration definition

Enumerator
MAX30105_SLOT_1 

slot 1

MAX30105_SLOT_2 

slot 2

MAX30105_SLOT_3 

slot 3

MAX30105_SLOT_4 

slot 4

Definition at line 170 of file driver_max30105.h.

Function Documentation

◆ max30105_deinit()

uint8_t max30105_deinit ( max30105_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a max30105 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 243 of file driver_max30105.c.

◆ max30105_get_adc_resolution()

uint8_t max30105_get_adc_resolution ( max30105_handle_t * handle,
max30105_adc_resolution_t * resolution )

get the adc resolution

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*resolutionpointer to an adc resolution buffer
Returns
status code
  • 0 success
  • 1 get adc resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1823 of file driver_max30105.c.

◆ max30105_get_die_temperature()

uint8_t max30105_get_die_temperature ( max30105_handle_t * handle,
max30105_bool_t * enable )

get the die temperature status

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get die temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2389 of file driver_max30105.c.

◆ max30105_get_fifo_almost_full()

uint8_t max30105_get_fifo_almost_full ( max30105_handle_t * handle,
uint8_t * value )

get the fifo almost full value

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*valuepointer to a fifo almost full value buffer
Returns
status code
  • 0 success
  • 1 get fifo almost full failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1369 of file driver_max30105.c.

◆ max30105_get_fifo_data()

uint8_t max30105_get_fifo_data ( max30105_handle_t * handle,
uint8_t * data )

get the fifo data

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*datapointer to a fifo data buffer
Returns
status code
  • 0 success
  • 1 get fifo data failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1118 of file driver_max30105.c.

◆ max30105_get_fifo_overflow_counter()

uint8_t max30105_get_fifo_overflow_counter ( max30105_handle_t * handle,
uint8_t * counter )

get the fifo overflow counter

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*counterpointer to a counter buffer
Returns
status code
  • 0 success
  • 1 get fifo overflow counter failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 965 of file driver_max30105.c.

◆ max30105_get_fifo_read_pointer()

uint8_t max30105_get_fifo_read_pointer ( max30105_handle_t * handle,
uint8_t * pointer )

get the fifo read pointer

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*pointerpointer to a pointer buffer
Returns
status code
  • 0 success
  • 1 get fifo read pointer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1046 of file driver_max30105.c.

◆ max30105_get_fifo_roll()

uint8_t max30105_get_fifo_roll ( max30105_handle_t * handle,
max30105_bool_t * enable )

get the fifo roll status

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get fifo roll failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1280 of file driver_max30105.c.

◆ max30105_get_fifo_sample_averaging()

uint8_t max30105_get_fifo_sample_averaging ( max30105_handle_t * handle,
max30105_sample_averaging_t * sample )

get the fifo sample averaging

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*samplepointer to a fifo sample averaging buffer
Returns
status code
  • 0 success
  • 1 get fifo sample averaging failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1198 of file driver_max30105.c.

◆ max30105_get_fifo_write_pointer()

uint8_t max30105_get_fifo_write_pointer ( max30105_handle_t * handle,
uint8_t * pointer )

get the fifo write pointer

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*pointerpointer to a pointer buffer
Returns
status code
  • 0 success
  • 1 get fifo write pointer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 884 of file driver_max30105.c.

◆ max30105_get_id()

uint8_t max30105_get_id ( max30105_handle_t * handle,
uint8_t * revision_id,
uint8_t * part_id )

get the chip id

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*revision_idpointer to a revision id buffer
[out]*part_idpointer to a part id buffer
Returns
status code
  • 0 success
  • 1 get id failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2551 of file driver_max30105.c.

◆ max30105_get_interrupt()

uint8_t max30105_get_interrupt ( max30105_handle_t * handle,
max30105_interrupt_t type,
max30105_bool_t * enable )

get the interrupt bool

Parameters
[in]*handlepointer to a max30105 handle structure
[in]typeinterrupt type
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 787 of file driver_max30105.c.

◆ max30105_get_interrupt_status()

uint8_t max30105_get_interrupt_status ( max30105_handle_t * handle,
max30105_interrupt_status_t status,
max30105_bool_t * enable )

get the interrupt status

Parameters
[in]*handlepointer to a max30105 handle structure
[in]statusinterrupt status
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 663 of file driver_max30105.c.

◆ max30105_get_led_green_pulse_amplitude()

uint8_t max30105_get_led_green_pulse_amplitude ( max30105_handle_t * handle,
uint8_t * amp )

get the green led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*amppointer to a green led pulse amplitude buffer
Returns
status code
  • 0 success
  • 1 get led green pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2035 of file driver_max30105.c.

◆ max30105_get_led_ir_pulse_amplitude()

uint8_t max30105_get_led_ir_pulse_amplitude ( max30105_handle_t * handle,
uint8_t * amp )

get the ir led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*amppointer to an ir led pulse amplitude buffer
Returns
status code
  • 0 success
  • 1 get led ir pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1965 of file driver_max30105.c.

◆ max30105_get_led_proximity_pulse_amplitude()

uint8_t max30105_get_led_proximity_pulse_amplitude ( max30105_handle_t * handle,
uint8_t * amp )

get the proximity led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*amppointer to a proximity led pulse amplitude buffer
Returns
status code
  • 0 success
  • 1 get led proximity pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2105 of file driver_max30105.c.

◆ max30105_get_led_red_pulse_amplitude()

uint8_t max30105_get_led_red_pulse_amplitude ( max30105_handle_t * handle,
uint8_t * amp )

get the red led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*amppointer to a red led pulse amplitude buffer
Returns
status code
  • 0 success
  • 1 get led red pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1895 of file driver_max30105.c.

◆ max30105_get_mode()

uint8_t max30105_get_mode ( max30105_handle_t * handle,
max30105_mode_t * mode )

get the mode

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1577 of file driver_max30105.c.

◆ max30105_get_particle_sensing_adc_range()

uint8_t max30105_get_particle_sensing_adc_range ( max30105_handle_t * handle,
max30105_particle_sensing_adc_range_t * range )

get the particle sensing adc range

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*rangepointer to a particle sensing adc range buffer
Returns
status code
  • 0 success
  • 1 get particle sensing adc range failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1659 of file driver_max30105.c.

◆ max30105_get_particle_sensing_sample_rate()

uint8_t max30105_get_particle_sensing_sample_rate ( max30105_handle_t * handle,
max30105_particle_sensing_sample_rate_t * rate )

get the particle sensing sample rate

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*ratepointer to a particle sensing sample rate buffer
Returns
status code
  • 0 success
  • 1 get particle sensing sample rate failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1741 of file driver_max30105.c.

◆ max30105_get_proximity_interrupt_threshold()

uint8_t max30105_get_proximity_interrupt_threshold ( max30105_handle_t * handle,
uint8_t * threshold )

get the proximity interrupt threshold

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*thresholdpointer to a proximity interrupt threshold buffer
Returns
status code
  • 0 success
  • 1 get proximity interrupt threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2461 of file driver_max30105.c.

◆ max30105_get_shutdown()

uint8_t max30105_get_shutdown ( max30105_handle_t * handle,
max30105_bool_t * enable )

get the shutdown

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get shutdown failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1451 of file driver_max30105.c.

◆ max30105_get_slot()

uint8_t max30105_get_slot ( max30105_handle_t * handle,
max30105_slot_t slot,
max30105_led_t * led )

get the led slot

Parameters
[in]*handlepointer to a max30105 handle structure
[in]slotslot number
[out]*ledpointer to a led mode buffer
Returns
status code
  • 0 success
  • 1 get slot failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2259 of file driver_max30105.c.

◆ max30105_info()

uint8_t max30105_info ( max30105_info_t * info)

get chip's information

Parameters
[out]*infopointer to a max30105 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2658 of file driver_max30105.c.

◆ max30105_init()

uint8_t max30105_init ( max30105_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a max30105 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is invalid
  • 5 reset failed
  • 6 reset fifo failed
Note
none

Definition at line 96 of file driver_max30105.c.

◆ max30105_irq_handler()

uint8_t max30105_irq_handler ( max30105_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to a max30105 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 295 of file driver_max30105.c.

◆ max30105_proximity_threshold_convert_to_data()

uint8_t max30105_proximity_threshold_convert_to_data ( max30105_handle_t * handle,
uint8_t reg,
uint32_t * adc )

convert the register raw data to the proximity threshold

Parameters
[in]*handlepointer to a max30105 handle structure
[in]regregister raw data
[out]*adcpointer to an adc range buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2523 of file driver_max30105.c.

◆ max30105_proximity_threshold_convert_to_register()

uint8_t max30105_proximity_threshold_convert_to_register ( max30105_handle_t * handle,
uint32_t adc,
uint8_t * reg )

convert the proximity threshold to the register raw data

Parameters
[in]*handlepointer to a max30105 handle structure
[in]adcadc range
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2496 of file driver_max30105.c.

◆ max30105_read()

uint8_t max30105_read ( max30105_handle_t * handle,
uint32_t * raw_red,
uint32_t * raw_ir,
uint32_t * raw_green,
uint8_t * len )

read the data

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*raw_redpointer to a red raw data buffer
[out]*raw_irpointer to an ir raw data buffer
[out]*raw_greenpointer to a green raw data buffer
[in,out]*lenpointer to a length buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 fifo overrun
  • 5 mode is invalid
Note
none

Definition at line 406 of file driver_max30105.c.

◆ max30105_read_temperature()

uint8_t max30105_read_temperature ( max30105_handle_t * handle,
uint16_t * raw,
float * temp )

read the temperature

Parameters
[in]*handlepointer to a max30105 handle structure
[out]*rawpointer to a raw data buffer
[out]*temppointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 read temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 576 of file driver_max30105.c.

◆ max30105_reset()

uint8_t max30105_reset ( max30105_handle_t * handle)

reset the chip

Parameters
[in]*handlepointer to a max30105 handle structure
Returns
status code
  • 0 success
  • 1 reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1487 of file driver_max30105.c.

◆ max30105_set_adc_resolution()

uint8_t max30105_set_adc_resolution ( max30105_handle_t * handle,
max30105_adc_resolution_t resolution )

set the adc resolution

Parameters
[in]*handlepointer to a max30105 handle structure
[in]resolutionadc resolution
Returns
status code
  • 0 success
  • 1 set adc resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1778 of file driver_max30105.c.

◆ max30105_set_die_temperature()

uint8_t max30105_set_die_temperature ( max30105_handle_t * handle,
max30105_bool_t enable )

enable or disable die temperature

Parameters
[in]*handlepointer to a max30105 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set die temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2344 of file driver_max30105.c.

◆ max30105_set_fifo_almost_full()

uint8_t max30105_set_fifo_almost_full ( max30105_handle_t * handle,
uint8_t value )

set the fifo almost full value

Parameters
[in]*handlepointer to a max30105 handle structure
[in]valuefifo almost full value
Returns
status code
  • 0 success
  • 1 set fifo almost full failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 value can't be over 0xF
Note
none

Definition at line 1318 of file driver_max30105.c.

◆ max30105_set_fifo_data()

uint8_t max30105_set_fifo_data ( max30105_handle_t * handle,
uint8_t data )

set the fifo data

Parameters
[in]*handlepointer to a max30105 handle structure
[in]datafifo data
Returns
status code
  • 0 success
  • 1 set fifo data failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1083 of file driver_max30105.c.

◆ max30105_set_fifo_overflow_counter()

uint8_t max30105_set_fifo_overflow_counter ( max30105_handle_t * handle,
uint8_t counter )

set the fifo overflow counter

Parameters
[in]*handlepointer to a max30105 handle structure
[in]counteroverflow counter
Returns
status code
  • 0 success
  • 1 set fifo overflow counter failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 counter can't be over 0x1F
Note
counter <= 0x1F

Definition at line 922 of file driver_max30105.c.

◆ max30105_set_fifo_read_pointer()

uint8_t max30105_set_fifo_read_pointer ( max30105_handle_t * handle,
uint8_t pointer )

set the fifo read pointer

Parameters
[in]*handlepointer to a max30105 handle structure
[in]pointerread pointer
Returns
status code
  • 0 success
  • 1 set fifo read pointer failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 pointer can't be over 0x1F
Note
pointer <= 0x1F

Definition at line 1003 of file driver_max30105.c.

◆ max30105_set_fifo_roll()

uint8_t max30105_set_fifo_roll ( max30105_handle_t * handle,
max30105_bool_t enable )

enable or disable the fifo roll

Parameters
[in]*handlepointer to a max30105 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set fifo roll failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1235 of file driver_max30105.c.

◆ max30105_set_fifo_sample_averaging()

uint8_t max30105_set_fifo_sample_averaging ( max30105_handle_t * handle,
max30105_sample_averaging_t sample )

set the fifo sample averaging

Parameters
[in]*handlepointer to a max30105 handle structure
[in]samplefifo sample averaging
Returns
status code
  • 0 success
  • 1 set fifo sample averaging failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1153 of file driver_max30105.c.

◆ max30105_set_fifo_write_pointer()

uint8_t max30105_set_fifo_write_pointer ( max30105_handle_t * handle,
uint8_t pointer )

set the fifo write pointer

Parameters
[in]*handlepointer to a max30105 handle structure
[in]pointerwritten pointer
Returns
status code
  • 0 success
  • 1 set fifo write pointer failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 pointer can't be over 0x1F
Note
pointer <= 0x1F

Definition at line 841 of file driver_max30105.c.

◆ max30105_set_interrupt()

uint8_t max30105_set_interrupt ( max30105_handle_t * handle,
max30105_interrupt_t type,
max30105_bool_t enable )

set the interrupt bool

Parameters
[in]*handlepointer to a max30105 handle structure
[in]typeinterrupt type
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 717 of file driver_max30105.c.

◆ max30105_set_led_green_pulse_amplitude()

uint8_t max30105_set_led_green_pulse_amplitude ( max30105_handle_t * handle,
uint8_t amp )

set the green led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[in]ampgreen led pulse amplitude
Returns
status code
  • 0 success
  • 1 set led green pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2000 of file driver_max30105.c.

◆ max30105_set_led_ir_pulse_amplitude()

uint8_t max30105_set_led_ir_pulse_amplitude ( max30105_handle_t * handle,
uint8_t amp )

set the ir led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[in]ampir led pulse amplitude
Returns
status code
  • 0 success
  • 1 set led ir pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1930 of file driver_max30105.c.

◆ max30105_set_led_proximity_pulse_amplitude()

uint8_t max30105_set_led_proximity_pulse_amplitude ( max30105_handle_t * handle,
uint8_t amp )

set the proximity led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[in]ampproximity led pulse amplitude
Returns
status code
  • 0 success
  • 1 set led proximity pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2070 of file driver_max30105.c.

◆ max30105_set_led_red_pulse_amplitude()

uint8_t max30105_set_led_red_pulse_amplitude ( max30105_handle_t * handle,
uint8_t amp )

set the red led pulse amplitude

Parameters
[in]*handlepointer to a max30105 handle structure
[in]ampred led pulse amplitude
Returns
status code
  • 0 success
  • 1 set led red pulse amplitude failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1860 of file driver_max30105.c.

◆ max30105_set_mode()

uint8_t max30105_set_mode ( max30105_handle_t * handle,
max30105_mode_t mode )

set the mode

Parameters
[in]*handlepointer to a max30105 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1532 of file driver_max30105.c.

◆ max30105_set_particle_sensing_adc_range()

uint8_t max30105_set_particle_sensing_adc_range ( max30105_handle_t * handle,
max30105_particle_sensing_adc_range_t range )

set the particle sensing adc range

Parameters
[in]*handlepointer to a max30105 handle structure
[in]rangeparticle sensing adc range
Returns
status code
  • 0 success
  • 1 set particle sensing adc range failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1614 of file driver_max30105.c.

◆ max30105_set_particle_sensing_sample_rate()

uint8_t max30105_set_particle_sensing_sample_rate ( max30105_handle_t * handle,
max30105_particle_sensing_sample_rate_t rate )

set the particle sensing sample rate

Parameters
[in]*handlepointer to a max30105 handle structure
[in]rateparticle sensing sample rate
Returns
status code
  • 0 success
  • 1 set particle sensing sample rate failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1696 of file driver_max30105.c.

◆ max30105_set_proximity_interrupt_threshold()

uint8_t max30105_set_proximity_interrupt_threshold ( max30105_handle_t * handle,
uint8_t threshold )

set the proximity interrupt threshold

Parameters
[in]*handlepointer to a max30105 handle structure
[in]thresholdproximity interrupt threshold
Returns
status code
  • 0 success
  • 1 set proximity interrupt threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2426 of file driver_max30105.c.

◆ max30105_set_shutdown()

uint8_t max30105_set_shutdown ( max30105_handle_t * handle,
max30105_bool_t enable )

set the shutdown

Parameters
[in]*handlepointer to a max30105 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set shutdown failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1406 of file driver_max30105.c.

◆ max30105_set_slot()

uint8_t max30105_set_slot ( max30105_handle_t * handle,
max30105_slot_t slot,
max30105_led_t led )

set the led slot

Parameters
[in]*handlepointer to a max30105 handle structure
[in]slotslot number
[in]ledled mode
Returns
status code
  • 0 success
  • 1 set slot failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2141 of file driver_max30105.c.