c420mar 2.0.0.0
Public function

Functions

void c420mar_cfg_setup (c420mar_cfg_t *cfg)
 Config Object Initialization function.
 
c420MAR_RETVAL c420mar_init (c420mar_t *ctx, c420mar_cfg_t *cfg)
 Initialization function.
 
void c420mar_generic_transfer (c420mar_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
float c420mar_read_data (c420mar_t *ctx)
 Read data function.
 

Detailed Description

Function Documentation

◆ c420mar_cfg_setup()

void c420mar_cfg_setup ( c420mar_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.

◆ c420mar_generic_transfer()

void c420mar_generic_transfer ( c420mar_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

◆ c420mar_init()

c420MAR_RETVAL c420mar_init ( c420mar_t * ctx,
c420mar_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ c420mar_read_data()

float c420mar_read_data ( c420mar_t * ctx)

Read data function.

Parameters
ctxClick object.

@description This function reads the 16-bit current value from the SPI data register, and then normalizes and converts it to float.