oximeter 2.0.0.0
Public function

Functions

void oximeter_cfg_setup (oximeter_cfg_t *cfg)
 Config Object Initialization function.
 
err_t oximeter_init (oximeter_t *ctx, oximeter_cfg_t *cfg)
 Initialization function.
 
void oximeter_default_cfg (oximeter_t *ctx)
 Click Default Configuration function.
 
err_t oximeter_write_reg (oximeter_t *ctx, uint8_t reg, uint16_t data_in)
 Generic Write function.
 
err_t oximeter_read_reg (oximeter_t *ctx, uint8_t reg, uint16_t *data_out, uint8_t len)
 Generic Read function.
 
err_t oximeter_set_time_slot_a (oximeter_t *ctx, oximeter_enable_t *dev_enable, uint8_t set_mode)
 Time Slot A Set function.
 
err_t oximeter_set_time_slot_b (oximeter_t *ctx, oximeter_enable_t *dev_enable, uint8_t set_mode)
 Time Slot B Set function.
 
err_t oximeter_enable_channels (oximeter_t *ctx, uint8_t select_channel)
 Channels Enable function.
 
void oximeter_read_data (oximeter_t *ctx, uint32_t *chann_results, uint8_t result_mode)
 Data Read function.
 
uint8_t oximeter_get_int_gpio0 (oximeter_t *ctx)
 GPIO0 Interrupt Get function.
 
uint8_t oximeter_get_int_gpio1 (oximeter_t *ctx)
 GPIO1 Interrupt Get function.
 
void oximeter_reset (oximeter_t *ctx)
 Reset function.
 
err_t oximeter_set_mode (oximeter_t *ctx, uint16_t select_mode)
 Mode Set function.
 

Detailed Description

Function Documentation

◆ oximeter_cfg_setup()

void oximeter_cfg_setup ( oximeter_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ oximeter_default_cfg()

void oximeter_default_cfg ( oximeter_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for Oximeter click.

◆ oximeter_enable_channels()

err_t oximeter_enable_channels ( oximeter_t * ctx,
uint8_t select_channel )

Channels Enable function.

Parameters
ctxClick object.
select_channelDetermines which channel/channels be enabled from CH1 to CH4
Returns
0 - OK, -1 - Wrong select_channel parameter value

Function determines which channel/channels be enabled.

◆ oximeter_get_int_gpio0()

uint8_t oximeter_get_int_gpio0 ( oximeter_t * ctx)

GPIO0 Interrupt Get function.

Parameters
ctxClick object.
Returns
The state of the GPIO0 pin.

Function checks the state of the GPIO0 pin.

◆ oximeter_get_int_gpio1()

uint8_t oximeter_get_int_gpio1 ( oximeter_t * ctx)

GPIO1 Interrupt Get function.

Parameters
ctxClick object.
Returns
The state of the GPIO1 pin.

Function checks the state of the GPIO1 pin.

◆ oximeter_init()

err_t oximeter_init ( oximeter_t * ctx,
oximeter_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ oximeter_read_data()

void oximeter_read_data ( oximeter_t * ctx,
uint32_t * chann_results,
uint8_t result_mode )

Data Read function.

Parameters
ctxClick object.
chann_resultsBuffer where results be stored
result_mode0 - average results, 1 - sum results

Function reads data in the desired mode for determined Slot.

◆ oximeter_read_reg()

err_t oximeter_read_reg ( oximeter_t * ctx,
uint8_t reg,
uint16_t * data_out,
uint8_t len )

Generic Read function.

Parameters
ctxClick object.
regAddress which from data be read
data_outBuffer where data be stored
lenNumber of registers to be read
Returns
0 - OK, -1 - Wrong address parameter or Wrong len parameter value

Function reads 16-bit data from the register/registers.

◆ oximeter_reset()

void oximeter_reset ( oximeter_t * ctx)

Reset function.

Parameters
ctxClick object.

Function performs the SW reset of the device and waits until the device returns back to normal state.

◆ oximeter_set_mode()

err_t oximeter_set_mode ( oximeter_t * ctx,
uint16_t select_mode )

Mode Set function.

Parameters
ctxClick object.
select_mode0 - Standby Mode, 1 - Program Mode, 2 - Normal OP Mode
Returns
0 - OK, -1 - Wrong select_mode parameter value

Function puts the device to desired operating mode.

◆ oximeter_set_time_slot_a()

err_t oximeter_set_time_slot_a ( oximeter_t * ctx,
oximeter_enable_t * dev_enable,
uint8_t set_mode )

Time Slot A Set function.

Parameters
ctxClick object.
dev_enableStructure which determines which photodiode input/inputs be connected from PD1 to PD8 and determines which LED input be connected from LEDX1 to LEDX3 enable
set_mode0 - normal operating mode, 1 - digital integration operating mode
Returns
0 - OK, -1 - Wrong enable_photodiode parameter value or Wrong enable_led parameter value

Function performs the configuration for Time Slot A and enables the interrupt for this Slot.

◆ oximeter_set_time_slot_b()

err_t oximeter_set_time_slot_b ( oximeter_t * ctx,
oximeter_enable_t * dev_enable,
uint8_t set_mode )

Time Slot B Set function.

Parameters
ctxClick object.
dev_enableStructure which determines which photodiode input/inputs be connected from PD1 to PD8 and determines which LED input be connected from LEDX1 to LEDX3 enable
set_mode0 - normal operating mode, 1 - digital integration operating mode
Returns
0 - OK, -1 - Wrong enable_photodiode parameter value or Wrong enable_led parameter value

Function performs the configuration for Time Slot B and enables the interrupt for this Slot.

◆ oximeter_write_reg()

err_t oximeter_write_reg ( oximeter_t * ctx,
uint8_t reg,
uint16_t data_in )

Generic Write function.

Parameters
ctxClick object.
regAddress where data be written
data_inData to be written
Returns
0 - OK, -1 - Wrong address parameter

Function writes 16-bit data to the register.