uarti2cspi 2.0.0.0

Functions

void uarti2cspi_cfg_setup (uarti2cspi_cfg_t *cfg)
 Config Object Initialization function.
 
UARTI2CSPI_RETVAL uarti2cspi_init (uarti2cspi_t *ctx, uarti2cspi_cfg_t *cfg)
 Initialization function.
 
void uarti2cspi_generic_write (uarti2cspi_t *ctx, uint8_t reg, uint8_t data_buf)
 Generic write function.
 
void uarti2cspi_generic_read (uarti2cspi_t *ctx, uint8_t reg, uint8_t *data_buf)
 Generic read function.
 
void uarti2cspi_set_reset (uarti2cspi_t *ctx, uint8_t state)
 Set RST pin state function.
 
void uarti2cspi_advanced_init (uarti2cspi_t *ctx, uint32_t baud_rate, uint8_t data_bits, uint8_t parity_mode, uint8_t stop_bits)
 Advanced initialization function.
 
void uarti2cspi_interrupt_enable (uarti2cspi_t *ctx, uint8_t vector)
 Interrupt enable function.
 
void uarti2cspi_uart_write_text (uarti2cspi_t *ctx, uint8_t *w_text)
 Uart write text function.
 
void uarti2cspi_uart_write (uarti2cspi_t *ctx, uint8_t w_byte)
 Uart write function.
 
uint8_t uarti2cspi_uart_data_ready (uarti2cspi_t *ctx)
 Uart data ready function.
 
uint8_t uarti2cspi_uart_read (uarti2cspi_t *ctx)
 Uart read function.
 

Detailed Description

Function Documentation

◆ uarti2cspi_advanced_init()

void uarti2cspi_advanced_init ( uarti2cspi_t * ctx,
uint32_t baud_rate,
uint8_t data_bits,
uint8_t parity_mode,
uint8_t stop_bits )

Advanced initialization function.

Parameters
ctxClick object.
baud_rateBaud rate.
data_bitsData bits.
parity_modeParity mode.
stop_bitsStop bits.

@description This function configures the click module.

◆ uarti2cspi_cfg_setup()

void uarti2cspi_cfg_setup ( uarti2cspi_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.

◆ uarti2cspi_generic_read()

void uarti2cspi_generic_read ( uarti2cspi_t * ctx,
uint8_t reg,
uint8_t * data_buf )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.

@description This function reads data from the desired register.

◆ uarti2cspi_generic_write()

void uarti2cspi_generic_write ( uarti2cspi_t * ctx,
uint8_t reg,
uint8_t data_buf )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf

@description This function writes data to the desired register.

◆ uarti2cspi_init()

UARTI2CSPI_RETVAL uarti2cspi_init ( uarti2cspi_t * ctx,
uarti2cspi_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ uarti2cspi_interrupt_enable()

void uarti2cspi_interrupt_enable ( uarti2cspi_t * ctx,
uint8_t vector )

Interrupt enable function.

Parameters
ctxClick object.
vectorIER vector.

@description This function enables/disables interrupts on the click module by writing the specified configuration vector to the Interrupt Enable Register.

◆ uarti2cspi_set_reset()

void uarti2cspi_set_reset ( uarti2cspi_t * ctx,
uint8_t state )

Set RST pin state function.

Parameters
ctxClick object.
stateThe state of RST pin.

@description This function sets the RST pin state.

◆ uarti2cspi_uart_data_ready()

uint8_t uarti2cspi_uart_data_ready ( uarti2cspi_t * ctx)

Uart data ready function.

Parameters
ctxClick object.
Returns
  • 0 - DATA NOT READY,
  • 1 - DATA READY.
@description This function checks if UART data is ready.

◆ uarti2cspi_uart_read()

uint8_t uarti2cspi_uart_read ( uarti2cspi_t * ctx)

Uart read function.

Parameters
ctxClick object.
Returns
Read data byte.

@description This function reads one byte from the click module.

◆ uarti2cspi_uart_write()

void uarti2cspi_uart_write ( uarti2cspi_t * ctx,
uint8_t w_byte )

Uart write function.

Parameters
ctxClick object.
w_byteData byte.

@description This function sends the specified byte using UART.

◆ uarti2cspi_uart_write_text()

void uarti2cspi_uart_write_text ( uarti2cspi_t * ctx,
uint8_t * w_text )

Uart write text function.

Parameters
ctxClick object.
w_textData message pointer.

@description This function sends the specified string using UART.