oximeter2 2.0.0.0
Public function

Functions

void oximeter2_cfg_setup (oximeter2_cfg_t *cfg)
 Oximeter 2 configuration object setup function.
 
OXIMETER2_RETVAL oximeter2_init (oximeter2_t *ctx, oximeter2_cfg_t *cfg)
 Initialization function.
 
void oximeter2_default_cfg (oximeter2_t *ctx)
 Click Default Configuration function.
 
uint8_t oximeter2_write_reg (oximeter2_t *ctx, uint8_t register_address, uint16_t transfer_data)
 Generic Write function.
 
uint8_t oximeter2_read_reg (oximeter2_t *cfg, uint8_t register_address, uint16_t *data_out, uint8_t num_of_regs)
 Generic Read function.
 
uint8_t oximeter2_set_time_slot_a (oximeter2_t *ctx, enable_t *dev_enable)
 Time Slot A Set function.
 
uint8_t oximeter2_set_time_slot_b (oximeter2_t *ctx, enable_t *dev_enable)
 Time Slot B Set function.
 
void oximeter2_read_data (oximeter2_t *ctx, uint32_t *channel_results)
 Oximeter 2 Data Read function.
 
void oximeter2_reset (oximeter2_t *ctx)
 Oximeter 2 Reset function.
 
uint8_t oximeter2_set_mode (oximeter2_t *ctx, uint8_t desired_mode)
 Oximeter 2 Mode Set function.
 

Detailed Description

Function Documentation

◆ oximeter2_cfg_setup()

void oximeter2_cfg_setup ( oximeter2_cfg_t * cfg)

Oximeter 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[in]*cfgClick configuration structure.
Note
All used pins will be set to unconnected state.

◆ oximeter2_default_cfg()

void oximeter2_default_cfg ( oximeter2_t * ctx)

Click Default Configuration function.

This function executes default configuration for Oximeter 2 Click.

Parameters
[in]*ctxClick object.

◆ oximeter2_init()

OXIMETER2_RETVAL oximeter2_init ( oximeter2_t * ctx,
oximeter2_cfg_t * cfg )

Initialization function.

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

Parameters
[in]*ctxClick object.
[in]*cfgClick configuration structure.

◆ oximeter2_read_data()

void oximeter2_read_data ( oximeter2_t * ctx,
uint32_t * channel_results )

Oximeter 2 Data Read function.

Function reads data in the desired mode for determined Slot.

Parameters
[in]*ctxClick object.
[in]*channel_resultsBuffer where results will be stored.

◆ oximeter2_read_reg()

uint8_t oximeter2_read_reg ( oximeter2_t * cfg,
uint8_t register_address,
uint16_t * data_out,
uint8_t num_of_regs )

Generic Read function.

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

Parameters
[in]*cfgClick configuration.
[in]*register_addressRegister which will be read.
[out]*data_outBuffer for storing data that has been read.
[in]num_of_regsNumber of registers to be read.
Returns
0 - OK, 1 - Wrong address parameter.

◆ oximeter2_reset()

void oximeter2_reset ( oximeter2_t * ctx)

Oximeter 2 Reset function.

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

Parameters
[in]*ctxClick object.

◆ oximeter2_set_mode()

uint8_t oximeter2_set_mode ( oximeter2_t * ctx,
uint8_t desired_mode )

Oximeter 2 Mode Set function.

Function sets the device to desired operating mode.

Parameters
[in]*ctxClick object.
[in]desired_mode0 - Standby Mode, 1 - Program Mode, 2 - Normal Mode
Returns
0 - OK, 1 - Wrong desired_mode parameter value.

◆ oximeter2_set_time_slot_a()

uint8_t oximeter2_set_time_slot_a ( oximeter2_t * ctx,
enable_t * dev_enable )

Time Slot A Set function.

Function performs the configuration for Time Slot B.

Parameters
[in]*ctxClick object.
[in]*dev_enableStructure which determines which photodiode will be connected.
Returns
0 - OK, 1 - Wrong enable_photodiode parameter value.

◆ oximeter2_set_time_slot_b()

uint8_t oximeter2_set_time_slot_b ( oximeter2_t * ctx,
enable_t * dev_enable )

Time Slot B Set function.

Function performs the configuration for Time Slot B.

Parameters
[in]*ctxClick object.
[in]*dev_enableStructure which determines which photodiode will be connected.
Returns
0 - OK, 1 - Wrong enable_photodiode parameter value.

◆ oximeter2_write_reg()

uint8_t oximeter2_write_reg ( oximeter2_t * ctx,
uint8_t register_address,
uint16_t transfer_data )

Generic Write function.

Function writes 16-bit data to the register.

Parameters
[in]*ctxClick object.
[in]register_addressRegister which will be written to.
[in]transfer_dataData to be written.
Returns
0 - OK, 1 - Wrong address parameter.