linhall 2.0.0.0
Public function

Functions

void linhall_cfg_setup (linhall_cfg_t *cfg)
 Config Object Initialization function.
 
LINHALL_RETVAL linhall_init (linhall_t *ctx, linhall_cfg_t *cfg)
 Initialization function.
 
void linhall_generic_transfer (linhall_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
uint16_t linhall_read_data (linhall_t *ctx)
 Read 12-bit data function.
 

Detailed Description

Function Documentation

◆ linhall_cfg_setup()

void linhall_cfg_setup ( linhall_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.

◆ linhall_generic_transfer()

void linhall_generic_transfer ( linhall_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

◆ linhall_init()

LINHALL_RETVAL linhall_init ( linhall_t * ctx,
linhall_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ linhall_read_data()

uint16_t linhall_read_data ( linhall_t * ctx)

Read 12-bit data function.

Parameters
ctxClick object.
Returns
12-bit ADC value.

@description Function read 12-bit ADC value from the MCP3201 chip.