duallin 2.0.0.0
Public function

Functions

void duallin_cfg_setup (duallin_cfg_t *cfg)
 Config Object Initialization function.
 
DUALLIN_RETVAL duallin_init (duallin_t *ctx, duallin_cfg_t *cfg)
 Initialization function.
 
void duallin_generic_write (duallin_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int16_t duallin_generic_read (duallin_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void duallin_bus1_status (duallin_t *ctx, uint8_t state)
 Sets state of RST pin.
 
void duallin_bus2_status (duallin_t *ctx, uint8_t state)
 Sets state of CS pin.
 
void duallin_send_command (duallin_t *ctx, char *command)
 Send command.
 

Detailed Description

Function Documentation

◆ duallin_bus1_status()

void duallin_bus1_status ( duallin_t * ctx,
uint8_t state )

Sets state of RST pin.

Parameters
duallinClick object.
stateSet pin on low and high ( DUALLIN_PIN_STATE_HIGH or DUALLIN_PIN_STATE_LOW )

◆ duallin_bus2_status()

void duallin_bus2_status ( duallin_t * ctx,
uint8_t state )

Sets state of CS pin.

Parameters
duallinClick object.
stateSet pin on low and high ( DUALLIN_PIN_STATE_HIGH or DUALLIN_PIN_STATE_LOW )

◆ duallin_cfg_setup()

void duallin_cfg_setup ( duallin_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.

◆ duallin_generic_read()

int16_t duallin_generic_read ( duallin_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

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

◆ duallin_generic_write()

void duallin_generic_write ( duallin_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

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

◆ duallin_init()

DUALLIN_RETVAL duallin_init ( duallin_t * ctx,
duallin_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ duallin_send_command()

void duallin_send_command ( duallin_t * ctx,
char * command )

Send command.

Parameters
duallinClick object.
commandData to be send.