oximeter3 2.0.0.0
Public function

Functions

void oximeter3_cfg_setup (oximeter3_cfg_t *cfg)
 Config Object Initialization function.
 
OXIMETER3_RETVAL oximeter3_init (oximeter3_t *ctx, oximeter3_cfg_t *cfg)
 Initialization function.
 
void oximeter3_generic_write (oximeter3_t *ctx, uint8_t reg, uint8_t data_buf)
 Generic write function.
 
uint8_t oximeter3_generic_read (oximeter3_t *ctx, uint8_t reg)
 Generic read function.
 
uint8_t oximeter3_get_int_status (oximeter3_t *ctx)
 Gets state of the int pin.
 
uint16_t oximeter3_read_value (oximeter3_t *ctx, uint8_t type_macro)
 Generic function for reading als and proximity values.
 

Detailed Description

Function Documentation

◆ oximeter3_cfg_setup()

void oximeter3_cfg_setup ( oximeter3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ oximeter3_generic_read()

uint8_t oximeter3_generic_read ( oximeter3_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.

@description This function reads data from the desired register.

◆ oximeter3_generic_write()

void oximeter3_generic_write ( oximeter3_t * ctx,
uint8_t reg,
uint8_t data_buf )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ oximeter3_get_int_status()

uint8_t oximeter3_get_int_status ( oximeter3_t * ctx)

Gets state of the int pin.

Parameters
ctxClick object.
Returns
State of the pin

◆ oximeter3_init()

OXIMETER3_RETVAL oximeter3_init ( oximeter3_t * ctx,
oximeter3_cfg_t * cfg )

Initialization function.

Parameters
oximeter3Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ oximeter3_read_value()

uint16_t oximeter3_read_value ( oximeter3_t * ctx,
uint8_t type_macro )

Generic function for reading als and proximity values.

Parameters
ctxClick object.
type_macroOXIMETER3_HEART_RATE or OXIMETER3_ALS or OXIMETER3_PROX
Returns
Read data or OXIMETER3_ERROR if wrong macro is written