monarchadapter 2.0.0.0

Functions

void monarchadapter_cfg_setup (monarchadapter_cfg_t *cfg)
 Config Object Initialization function.
 
MONARCHADAPTER_RETVAL monarchadapter_init (monarchadapter_t *ctx, monarchadapter_cfg_t *cfg)
 Initialization function.
 
void monarchadapter_power_on (monarchadapter_t *ctx)
 Monarch Adapter power on.
 
void monarchadapter_set_rst_pin (monarchadapter_t *ctx, uint8_t state)
 Set RST ( reset ) pin state.
 
void monarchadapter_set_rts_pin (monarchadapter_t *ctx, uint8_t state)
 Set RTS ( cs ) pin state.
 
uint8_t monarchadapter_get_int_pin (monarchadapter_t *ctx)
 Get INT pin state.
 
uint8_t monarchadapter_get_rng_pin (monarchadapter_t *ctx)
 Get RNG ( an ) pin state.
 
void monarchadapter_generic_write (monarchadapter_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t monarchadapter_generic_read (monarchadapter_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void monarchadapter_send_command (monarchadapter_t *ctx, char *command)
 Function for send command.
 

Detailed Description

Function Documentation

◆ monarchadapter_cfg_setup()

void monarchadapter_cfg_setup ( monarchadapter_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.

◆ monarchadapter_generic_read()

int32_t monarchadapter_generic_read ( monarchadapter_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

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

◆ monarchadapter_generic_write()

void monarchadapter_generic_write ( monarchadapter_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

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

◆ monarchadapter_get_int_pin()

uint8_t monarchadapter_get_int_pin ( monarchadapter_t * ctx)

Get INT pin state.

Parameters
ctxClick object.
Returns
current pin state.

◆ monarchadapter_get_rng_pin()

uint8_t monarchadapter_get_rng_pin ( monarchadapter_t * ctx)

Get RNG ( an ) pin state.

Parameters
ctxClick object.
Returns
current pin state.

◆ monarchadapter_init()

MONARCHADAPTER_RETVAL monarchadapter_init ( monarchadapter_t * ctx,
monarchadapter_cfg_t * cfg )

Initialization function.

Parameters
monarchadapterClick object.
cfgClick configuration structure.

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

◆ monarchadapter_power_on()

void monarchadapter_power_on ( monarchadapter_t * ctx)

Monarch Adapter power on.

This function resets the chip on Monarch Adapter click.

Parameters
[in]ctx: Click context object. See monarchadapter_t object definition for detailed explanation.
Returns
Nothing.

◆ monarchadapter_send_command()

void monarchadapter_send_command ( monarchadapter_t * ctx,
char * command )

Function for send command.

Parameters
ctxClick object.
commandCommand to send.

◆ monarchadapter_set_rst_pin()

void monarchadapter_set_rst_pin ( monarchadapter_t * ctx,
uint8_t state )

Set RST ( reset ) pin state.

Parameters
ctxClick object.
stattePin state ( 1 or 0 ).

◆ monarchadapter_set_rts_pin()

void monarchadapter_set_rts_pin ( monarchadapter_t * ctx,
uint8_t state )

Set RTS ( cs ) pin state.

Parameters
ctxClick object.
stattePin state ( 1 or 0 ).