oximeter 2.0.0.0
|
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. | |
void oximeter_cfg_setup | ( | oximeter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void oximeter_default_cfg | ( | oximeter_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Oximeter click.
err_t oximeter_enable_channels | ( | oximeter_t * | ctx, |
uint8_t | select_channel ) |
Channels Enable function.
ctx | Click object. |
select_channel | Determines which channel/channels be enabled from CH1 to CH4 |
Function determines which channel/channels be enabled.
uint8_t oximeter_get_int_gpio0 | ( | oximeter_t * | ctx | ) |
GPIO0 Interrupt Get function.
ctx | Click object. |
Function checks the state of the GPIO0 pin.
uint8_t oximeter_get_int_gpio1 | ( | oximeter_t * | ctx | ) |
GPIO1 Interrupt Get function.
ctx | Click object. |
Function checks the state of the GPIO1 pin.
err_t oximeter_init | ( | oximeter_t * | ctx, |
oximeter_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void oximeter_read_data | ( | oximeter_t * | ctx, |
uint32_t * | chann_results, | ||
uint8_t | result_mode ) |
Data Read function.
ctx | Click object. |
chann_results | Buffer where results be stored |
result_mode | 0 - average results, 1 - sum results |
Function reads data in the desired mode for determined Slot.
err_t oximeter_read_reg | ( | oximeter_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out, | ||
uint8_t | len ) |
Generic Read function.
ctx | Click object. |
reg | Address which from data be read |
data_out | Buffer where data be stored |
len | Number of registers to be read |
Function reads 16-bit data from the register/registers.
void oximeter_reset | ( | oximeter_t * | ctx | ) |
Reset function.
ctx | Click object. |
Function performs the SW reset of the device and waits until the device returns back to normal state.
err_t oximeter_set_mode | ( | oximeter_t * | ctx, |
uint16_t | select_mode ) |
Mode Set function.
ctx | Click object. |
select_mode | 0 - Standby Mode, 1 - Program Mode, 2 - Normal OP Mode |
Function puts the device to desired operating mode.
err_t oximeter_set_time_slot_a | ( | oximeter_t * | ctx, |
oximeter_enable_t * | dev_enable, | ||
uint8_t | set_mode ) |
Time Slot A Set function.
ctx | Click object. |
dev_enable | Structure 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_mode | 0 - normal operating mode, 1 - digital integration operating mode |
Function performs the configuration for Time Slot A and enables the interrupt for this Slot.
err_t oximeter_set_time_slot_b | ( | oximeter_t * | ctx, |
oximeter_enable_t * | dev_enable, | ||
uint8_t | set_mode ) |
Time Slot B Set function.
ctx | Click object. |
dev_enable | Structure 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_mode | 0 - normal operating mode, 1 - digital integration operating mode |
Function performs the configuration for Time Slot B and enables the interrupt for this Slot.
err_t oximeter_write_reg | ( | oximeter_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Generic Write function.
ctx | Click object. |
reg | Address where data be written |
data_in | Data to be written |
Function writes 16-bit data to the register.