oximeter2 2.0.0.0
|
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. | |
void oximeter2_cfg_setup | ( | oximeter2_cfg_t * | cfg | ) |
Oximeter 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[in] | *cfg | Click configuration structure. |
void oximeter2_default_cfg | ( | oximeter2_t * | ctx | ) |
Click Default Configuration function.
This function executes default configuration for Oximeter 2 Click.
[in] | *ctx | Click object. |
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.
[in] | *ctx | Click object. |
[in] | *cfg | Click configuration structure. |
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.
[in] | *ctx | Click object. |
[in] | *channel_results | Buffer where results will be stored. |
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.
[in] | *cfg | Click configuration. |
[in] | *register_address | Register which will be read. |
[out] | *data_out | Buffer for storing data that has been read. |
[in] | num_of_regs | Number of registers to be read. |
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.
[in] | *ctx | Click object. |
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.
[in] | *ctx | Click object. |
[in] | desired_mode | 0 - Standby Mode, 1 - Program Mode, 2 - Normal Mode |
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.
[in] | *ctx | Click object. |
[in] | *dev_enable | Structure which determines which photodiode will be connected. |
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.
[in] | *ctx | Click object. |
[in] | *dev_enable | Structure which determines which photodiode will be connected. |
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.
[in] | *ctx | Click object. |
[in] | register_address | Register which will be written to. |
[in] | transfer_data | Data to be written. |