trf 2.0.0.0
Public function

Functions

void trf_cfg_setup (trf_cfg_t *cfg)
 Config Object Initialization function.
 
TRF_RETVAL trf_init (trf_t *ctx, trf_cfg_t *cfg)
 Initialization function.
 
void trf_generic_multi_write (trf_t *ctx, char *data_buf, uint8_t len)
 Generic multi write function.
 
void trf_generic_multi_read (trf_t *ctx, char *data_buf, uint8_t len)
 Generic multi read function.
 
char trf_generic_single_read (trf_t *ctx)
 Generic single read function.
 
void trf_generic_single_write (trf_t *ctx, char tx_data)
 Generic single write function.
 
uint8_t byte_ready ()
 Check for new byte received.
 

Detailed Description

Function Documentation

◆ byte_ready()

uint8_t byte_ready ( )

Check for new byte received.

Return values
0- no new data / 1 - data ready

Checks is there a new byte received.

◆ trf_cfg_setup()

void trf_cfg_setup ( trf_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.

◆ trf_generic_multi_read()

void trf_generic_multi_read ( trf_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.

@description This function reads data.

◆ trf_generic_multi_write()

void trf_generic_multi_write ( trf_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

@description This function writes data.

◆ trf_generic_single_read()

char trf_generic_single_read ( trf_t * ctx)

Generic single read function.

Parameters
ctxClick object.
Returns
one byte data

@description This function read one byte data.

◆ trf_generic_single_write()

void trf_generic_single_write ( trf_t * ctx,
char tx_data )

Generic single write function.

Parameters
ctxClick object.
tx_dataInput data

@description This function write one byte data.

◆ trf_init()

TRF_RETVAL trf_init ( trf_t * ctx,
trf_cfg_t * cfg )

Initialization function.

Parameters
trfClick object.
cfgClick configuration structure.

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