fiberopt  2.0.0.0
Functions
Public function

Functions

void fiberopt_cfg_setup (fiberopt_cfg_t *cfg)
 Config Object Initialization function. More...
 
FIBEROPT_RETVAL fiberopt_init (fiberopt_t *ctx, fiberopt_cfg_t *cfg)
 Initialization function. More...
 
void fiberopt_generic_multi_write (fiberopt_t *ctx, char *data_buf, uint8_t len)
 Generic multi write function. More...
 
void fiberopt_generic_multi_read (fiberopt_t *ctx, char *data_buf, uint8_t len)
 Generic multi read function. More...
 
char fiberopt_generic_single_read (fiberopt_t *ctx)
 Generic single read function. More...
 
void fiberopt_generic_single_write (fiberopt_t *ctx, char tx_data)
 Generic single write function. More...
 

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_multi_read()

void fiberopt_generic_multi_read ( fiberopt_t ctx,
char *  data_buf,
uint8_t  len 
)

Generic multi read function.

Parameters
ctxClick object.
data_bufOutput data buffer.
lenNumber of the bytes in data buffer.

This function reads data.

◆ fiberopt_generic_multi_write()

void fiberopt_generic_multi_write ( fiberopt_t ctx,
char *  data_buf,
uint8_t  len 
)

Generic multi write function.

Parameters
ctxClick object.
data_bufInput data buffer
lenNumber of the bytes in the data buffer

This function writes data.

◆ fiberopt_generic_single_read()

char fiberopt_generic_single_read ( fiberopt_t ctx)

Generic single read function.

Parameters
ctxClick object.
Returns
one byte data

This function read one byte data.

◆ fiberopt_generic_single_write()

void fiberopt_generic_single_write ( fiberopt_t ctx,
char  tx_data 
)

Generic single write function.

Parameters
ctxClick object.
tx_dataInput data

This function write one byte data.

◆ fiberopt_init()

FIBEROPT_RETVAL fiberopt_init ( fiberopt_t ctx,
fiberopt_cfg_t cfg 
)

Initialization function.

Parameters
fiberoptClick object.
cfgClick configuration structure.

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