opto5 2.0.0.0
Opto 5 Click Driver

API for configuring and manipulating Opto 5 Click driver. More...

Topics

 Opto 5 MikroBUS Map
 MikroBUS pin mapping of Opto 5 Click driver.
 

Functions

void opto5_cfg_setup (opto5_cfg_t *cfg)
 Opto 5 configuration object setup function.
 
err_t opto5_init (opto5_t *ctx, opto5_cfg_t *cfg)
 Opto 5 initialization function.
 
void opto5_default_cfg (opto5_t *ctx)
 Opto 5 default configuration function.
 
void opto5_pin_set (opto5_t *ctx)
 Opto 5 pin setting function.
 
void opto5_pin_clear (opto5_t *ctx)
 Opto 5 pin clearing function.
 
void opto5_pin_toggle (opto5_t *ctx)
 Opto 5 pin toggling function.
 

Detailed Description

API for configuring and manipulating Opto 5 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

◆ opto5_cfg_setup()

void opto5_cfg_setup ( opto5_cfg_t * cfg)

Opto 5 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ opto5_default_cfg()

void opto5_default_cfg ( opto5_t * ctx)

Opto 5 default configuration function.

This function executes a default configuration of Opto 5 click board.

Parameters
[in]ctx: Click context object. See opto5_t object definition for detailed explanation.

See #err_t definition for detailed explanation.

Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ opto5_init()

err_t opto5_init ( opto5_t * ctx,
opto5_cfg_t * cfg )

Opto 5 initialization function.

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

Parameters
[out]ctx: Click context object. See opto5_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See opto5_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ opto5_pin_clear()

void opto5_pin_clear ( opto5_t * ctx)

Opto 5 pin clearing function.

This function clears the target pin on the low level of Opto 5 click board.

Parameters
[in]ctx: Click context object. See opto5_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ opto5_pin_set()

void opto5_pin_set ( opto5_t * ctx)

Opto 5 pin setting function.

This function sets the target pin on the high level of Opto 5 click board.

Parameters
[in]ctx: Click context object. See opto5_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ opto5_pin_toggle()

void opto5_pin_toggle ( opto5_t * ctx)

Opto 5 pin toggling function.

This function toggles the target pin from high to low level of Opto 5 click board, and vice versa.

Parameters
[in]ctx: Click context object. See opto5_t object definition for detailed explanation.
Returns
Nothing.
Note
None.