oximeter  2.0.0.0
Functions
Public function

Functions

void oximeter_cfg_setup (oximeter_cfg_t *cfg)
 Config Object Initialization function. More...
 
OXIMETER_RETVAL oximeter_init (oximeter_t *ctx, oximeter_cfg_t *cfg)
 Initialization function. More...
 
void oximeter_default_cfg (oximeter_t *ctx)
 Click Default Configuration function. More...
 
uint8_t oxim_write_reg (oximeter_t *ctx, uint8_t register_address, uint16_t transfer_data)
 Generic Write function. More...
 
uint8_t oxim_read_reg (oximeter_t *ctx, uint8_t register_address, uint16_t *data_out, uint8_t n_registers)
 Generic Read function. More...
 
uint8_t oxim_set_time_slot_a (oximeter_t *ctx, enable_t *dev_enable, uint8_t set_mode)
 Time Slot A Set function. More...
 
uint8_t oxim_set_time_slot_b (oximeter_t *ctx, enable_t *dev_enable, uint8_t set_mode)
 Time Slot B Set function. More...
 
uint8_t oxim_enable_channels (oximeter_t *ctx, uint8_t select_channel)
 Channels Enable function. More...
 
void oxim_read_data (oximeter_t *ctx, uint32_t *chann_results, uint8_t result_mode)
 Data Read function. More...
 
uint8_t oxim_get_interr_gpio0 (oximeter_t *ctx)
 GPIO0 Interrupt Get function. More...
 
uint8_t oxim_get_interr_gpio1 (oximeter_t *ctx)
 GPIO1 Interrupt Get function. More...
 
void oxim_reset (oximeter_t *ctx)
 Reset function. More...
 
uint8_t oxim_set_mode (oximeter_t *ctx, uint16_t select_mode)
 Mode Set function. More...
 

Detailed Description

Function Documentation

◆ oxim_enable_channels()

uint8_t oxim_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 selectChannel parameter value

@description Function determines which channel/channels be enabled.

◆ oxim_get_interr_gpio0()

uint8_t oxim_get_interr_gpio0 ( oximeter_t ctx)

GPIO0 Interrupt Get function.

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

@description Function checks the state of the GPIO0 pin.

◆ oxim_get_interr_gpio1()

uint8_t oxim_get_interr_gpio1 ( oximeter_t ctx)

GPIO1 Interrupt Get function.

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

@description Function checks the state of the GPIO1 pin.

◆ oxim_read_data()

void oxim_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

@description Function reads data in the desired mode for determined Slot.

◆ oxim_read_reg()

uint8_t oxim_read_reg ( oximeter_t ctx,
uint8_t  register_address,
uint16_t *  data_out,
uint8_t  n_registers 
)

Generic Read function.

Parameters
ctxClick object.
register_addressAddress which from data be read
data_outBuffer where data be stored
n_registersNumber of registers to be read
Returns
0 - OK, 1 - Wrong address parameter, 2 - Wrong nRegisters parameter value

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

◆ oxim_reset()

void oxim_reset ( oximeter_t ctx)

Reset function.

Parameters
ctxClick object.

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

◆ oxim_set_mode()

uint8_t oxim_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 selectMode parameter value

@description Function puts the device to desired operating mode.

◆ oxim_set_time_slot_a()

uint8_t oxim_set_time_slot_a ( oximeter_t ctx,
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, 2 - Wrong enable_led parameter value

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

◆ oxim_set_time_slot_b()

uint8_t oxim_set_time_slot_b ( oximeter_t ctx,
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, 2 - Wrong enable_led parameter value

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

◆ oxim_write_reg()

uint8_t oxim_write_reg ( oximeter_t ctx,
uint8_t  register_address,
uint16_t  transfer_data 
)

Generic Write function.

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

@description Function writes 16-bit data to the register.

◆ oximeter_cfg_setup()

void oximeter_cfg_setup ( oximeter_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.

◆ oximeter_default_cfg()

void oximeter_default_cfg ( oximeter_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Oximeter click.

◆ oximeter_init()

OXIMETER_RETVAL oximeter_init ( oximeter_t ctx,
oximeter_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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