magneticlinear 2.0.0.0

Functions

void magneticlinear_cfg_setup (magneticlinear_cfg_t *cfg)
 Config Object Initialization function.
 
MAGNETICLINEAR_RETVAL magneticlinear_init (magneticlinear_t *ctx, magneticlinear_cfg_t *cfg)
 Initialization function.
 
void magneticlinear_generic_transfer (magneticlinear_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
uint16_t magneticlinear_read_data (magneticlinear_t *ctx)
 Read data function.
 

Detailed Description

Function Documentation

◆ magneticlinear_cfg_setup()

void magneticlinear_cfg_setup ( magneticlinear_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.

◆ magneticlinear_generic_transfer()

void magneticlinear_generic_transfer ( magneticlinear_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

◆ magneticlinear_init()

MAGNETICLINEAR_RETVAL magneticlinear_init ( magneticlinear_t * ctx,
magneticlinear_cfg_t * cfg )

Initialization function.

Parameters
magneticlinearClick object.
cfgClick configuration structure.

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

◆ magneticlinear_read_data()

uint16_t magneticlinear_read_data ( magneticlinear_t * ctx)

Read data function.

Parameters
ctxClick object.

@description This function reads Magnetics Linear data.