fiberopt 2.0.0.0
Public function

Functions

void fiberopt_cfg_setup (fiberopt_cfg_t *cfg)
 Config Object Initialization function.
 
err_t fiberopt_init (fiberopt_t *ctx, fiberopt_cfg_t *cfg)
 Initialization function.
 
err_t fiberopt_generic_write (fiberopt_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
err_t fiberopt_generic_read (fiberopt_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic read function.
 

Detailed Description

Function Documentation

◆ fiberopt_cfg_setup()

void fiberopt_cfg_setup ( fiberopt_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ fiberopt_generic_read()

err_t fiberopt_generic_read ( fiberopt_t * ctx,
uint8_t * data_buf,
uint16_t len )

Generic read function.

Parameters
ctxClick object.
data_bufOutput data buffer.
lenNumber of the bytes in data buffer.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
This function reads data.

◆ fiberopt_generic_write()

err_t fiberopt_generic_write ( fiberopt_t * ctx,
uint8_t * data_buf,
uint16_t len )

Generic write function.

Parameters
ctxClick object.
data_bufInput data buffer
lenNumber of the bytes in the data buffer
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
This function writes data.

◆ fiberopt_init()

err_t fiberopt_init ( fiberopt_t * ctx,
fiberopt_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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