adapter 2.0.0.0
Public function

Functions

void adapter_cfg_setup (adapter_cfg_t *cfg)
 Config Object Initialization function.
 
ADAPTER_RETVAL adapter_init (adapter_t *ctx, adapter_cfg_t *cfg)
 Initialization function.
 
void adapter_generic_write (adapter_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void adapter_generic_read (adapter_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void adapter_generic_transfer (adapter_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void adapter_turn_tx_on (adapter_t *ctx)
 Turn TX on function.
 
void adapter_turn_rx_on (adapter_t *ctx)
 Turn RX on function.
 
void adapter_turn_pwm_on (adapter_t *ctx)
 Turn PWM on function.
 
void adapter_turn_tx_off (adapter_t *ctx)
 Turn TX off function.
 
void adapter_turn_rx_off (adapter_t *ctx)
 Turn RX off function.
 
void adapter_turn_pwm_off (adapter_t *ctx)
 Turn PWM off function.
 
uint8_t adapter_check_int (adapter_t *ctx)
 Check INT function.
 

Detailed Description

Function Documentation

◆ adapter_cfg_setup()

void adapter_cfg_setup ( adapter_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.

◆ adapter_check_int()

uint8_t adapter_check_int ( adapter_t * ctx)

Check INT function.

Parameters
ctxClick object.
Returns
State of the INT pin

@description Function is used to check the state of INT pin.

◆ adapter_generic_read()

void adapter_generic_read ( adapter_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function reads data from the desired register.

◆ adapter_generic_transfer()

void adapter_generic_transfer ( adapter_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ adapter_generic_write()

void adapter_generic_write ( adapter_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function writes data to the desired register.

◆ adapter_init()

ADAPTER_RETVAL adapter_init ( adapter_t * ctx,
adapter_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ adapter_turn_pwm_off()

void adapter_turn_pwm_off ( adapter_t * ctx)

Turn PWM off function.

Parameters
ctxClick object.

@description Function is used to set PWM pin to 0.

◆ adapter_turn_pwm_on()

void adapter_turn_pwm_on ( adapter_t * ctx)

Turn PWM on function.

Parameters
ctxClick object.

@description Function is used to set PWM pin to 1.

◆ adapter_turn_rx_off()

void adapter_turn_rx_off ( adapter_t * ctx)

Turn RX off function.

Parameters
ctxClick object.

@description Function is used to set RX pin to 0.

◆ adapter_turn_rx_on()

void adapter_turn_rx_on ( adapter_t * ctx)

Turn RX on function.

Parameters
ctxClick object.

@description Function is used to set RX pin to 1.

◆ adapter_turn_tx_off()

void adapter_turn_tx_off ( adapter_t * ctx)

Turn TX off function.

Parameters
ctxClick object.

@description Function is used to set TX pin to 0.

◆ adapter_turn_tx_on()

void adapter_turn_tx_on ( adapter_t * ctx)

Turn TX on function.

Parameters
ctxClick object.

@description Function is used to set TX pin to 1.