barcode2 2.0.0.0
Public function

Functions

void barcode2_cfg_setup (barcode2_cfg_t *cfg)
 Config Object Initialization function.
 
BARCODE2_RETVAL barcode2_init (barcode2_t *ctx, barcode2_cfg_t *cfg)
 Initialization function.
 
void barcode2_generic_write (barcode2_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t barcode2_generic_read (barcode2_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void barcode2_enable_scaning (barcode2_t *ctx, uint8_t en_state)
 Enable scaning function.
 
void barcode2_enable_reset (barcode2_t *ctx, uint8_t en_state)
 Enable reset function.
 

Detailed Description

Function Documentation

◆ barcode2_cfg_setup()

void barcode2_cfg_setup ( barcode2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ barcode2_enable_reset()

void barcode2_enable_reset ( barcode2_t * ctx,
uint8_t en_state )

Enable reset function.

Parameters
ctxClick object.
en_state
 
- 0x00 ( LOW )  : Enable.
- 0x01 ( HIGH ) : Disable. 

@description The function enables or disables barcode scaner reset depending on state parametar value.

◆ barcode2_enable_scaning()

void barcode2_enable_scaning ( barcode2_t * ctx,
uint8_t en_state )

Enable scaning function.

Parameters
ctxClick object.
en_state
    
- 0x00 ( LOW )  : Enable.
- 0x01 ( HIGH ) : Disable.

@description The function enables or disables barcode scaning depending on state parametar value.

◆ barcode2_generic_read()

int32_t barcode2_generic_read ( barcode2_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
ctxClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

@description This function read maximum length of data.

◆ barcode2_generic_write()

void barcode2_generic_write ( barcode2_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

@description This function write desired number of bytes.

◆ barcode2_init()

BARCODE2_RETVAL barcode2_init ( barcode2_t * ctx,
barcode2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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