ozone3 2.0.0.0
Ozone 3 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ ozone3_cfg_setup()

void ozone3_cfg_setup ( ozone3_cfg_t * cfg)

Ozone 3 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See ozone3_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ ozone3_default_cfg()

err_t ozone3_default_cfg ( ozone3_t * ctx)

Ozone 3 default configuration function.

This function executes a default configuration of Ozone 3 click board.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ ozone3_enable()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
[in]state: State of the RST.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ ozone3_generic_read()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ ozone3_generic_write()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ ozone3_get_o3_ppm()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
Returns
O3 ppm data.

See #err_t definition for detailed explanation.

Note
None.

◆ ozone3_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ ozone3_read_adc()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
[in]reg: Register address.
Returns
ADC data.

See #err_t definition for detailed explanation.

Note
None.

◆ ozone3_read_byte()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
[in]reg: Register address.
Returns
Output read data.

See #err_t definition for detailed explanation.

Note
None.

◆ ozone3_wait_ready()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
Returns
O3 ppm data.

See #err_t definition for detailed explanation.

Note
None.

◆ ozone3_write_byte()

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™.

Parameters
[in]ctx: Click context object. See ozone3_t object definition for detailed explanation.
[in]reg: Register address.
[in]dev_data: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.