ozone3 2.0.0.0
|
API for configuring and manipulating Ozone 3 Click driver. More...
Topics | |
Ozone 3 Registers List | |
List of registers of Ozone 3 Click driver. | |
Ozone 3 Registers Settings | |
Settings for registers of Ozone 3 Click driver. | |
Ozone 3 MikroBUS Map | |
MikroBUS pin mapping of Ozone 3 Click driver. | |
Functions | |
void | ozone3_cfg_setup (ozone3_cfg_t *cfg) |
Ozone 3 configuration object setup function. | |
err_t | ozone3_init (ozone3_t *ctx, ozone3_cfg_t *cfg) |
Ozone 3 initialization function. | |
err_t | ozone3_default_cfg (ozone3_t *ctx) |
Ozone 3 default configuration function. | |
err_t | ozone3_generic_write (ozone3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Ozone 3 I2C writing function. | |
err_t | ozone3_generic_read (ozone3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Ozone 3 I2C reading function. | |
err_t | ozone3_enable (ozone3_t *ctx, uint8_t state) |
Ozone 3 enable function. | |
err_t | ozone3_write_byte (ozone3_t *ctx, uint8_t reg, uint8_t dev_data) |
Ozone 3 write byte function. | |
uint8_t | ozone3_read_byte (ozone3_t *ctx, uint8_t reg) |
Ozone 3 read byte function. | |
uint16_t | ozone3_read_adc (ozone3_t *ctx) |
Ozone 3 read ADC function. | |
float | ozone3_get_o3_ppm (ozone3_t *ctx) |
Ozone 3 get O3 ppm function. | |
void | ozone3_wait_ready (ozone3_t *ctx) |
Ozone 3 wait ready function. | |
API for configuring and manipulating Ozone 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ozone3_cfg_setup | ( | ozone3_cfg_t * | cfg | ) |
Ozone 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ozone3_cfg_t object definition for detailed explanation. |
err_t ozone3_default_cfg | ( | ozone3_t * | ctx | ) |
Ozone 3 default configuration function.
This function executes a default configuration of Ozone 3 click board.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ozone3_enable | ( | ozone3_t * | ctx, |
uint8_t | state ) |
Ozone 3 enable function.
This function enable set state of the RST pin on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | state | : State of the RST. |
0
- Success, -1
- Error.err_t ozone3_generic_read | ( | ozone3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Ozone 3 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t ozone3_generic_write | ( | ozone3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Ozone 3 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.float ozone3_get_o3_ppm | ( | ozone3_t * | ctx | ) |
Ozone 3 get O3 ppm function.
This function get O3 ppm data by using I2C serial interface on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t ozone3_init | ( | ozone3_t * | ctx, |
ozone3_cfg_t * | cfg ) |
Ozone 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ozone3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint16_t ozone3_read_adc | ( | ozone3_t * | ctx | ) |
Ozone 3 read ADC function.
This function read the ADC data from by using I2C serial interface on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | reg | : Register address. |
See #err_t definition for detailed explanation.
uint8_t ozone3_read_byte | ( | ozone3_t * | ctx, |
uint8_t | reg ) |
Ozone 3 read byte function.
This function read a byte of data from the selected register by using I2C serial interface on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | reg | : Register address. |
See #err_t definition for detailed explanation.
void ozone3_wait_ready | ( | ozone3_t * | ctx | ) |
Ozone 3 wait ready function.
This function wait data ready by using I2C serial interface on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t ozone3_write_byte | ( | ozone3_t * | ctx, |
uint8_t | reg, | ||
uint8_t | dev_data ) |
Ozone 3 write byte function.
This function writes a byte of data to the selected register by using I2C serial interface on the Ozone 3 click board™.
[in] | ctx | : Click context object. See ozone3_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | dev_data | : Data to be written. |
0
- Success, -1
- Error.