gsr 2.0.0.0
Public function

Functions

void gsr_cfg_setup (gsr_cfg_t *cfg)
 Config Object Initialization function.
 
GSR_RETVAL gsr_init (gsr_t *ctx, gsr_cfg_t *cfg)
 Initialization function.
 
void gsr_generic_transfer (gsr_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
uint16_t gsr_read_value (gsr_t *ctx)
 Read Analog Value.
 

Detailed Description

Function Documentation

◆ gsr_cfg_setup()

void gsr_cfg_setup ( gsr_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.

◆ gsr_generic_transfer()

void gsr_generic_transfer ( gsr_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
blockTransfer block structure.

@description Generic SPI transfer, for sending and receiving packages

◆ gsr_init()

GSR_RETVAL gsr_init ( gsr_t * ctx,
gsr_cfg_t * cfg )

Initialization function.

Parameters
gsrClick object.
cfgClick configuration structure.

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

◆ gsr_read_value()

uint16_t gsr_read_value ( gsr_t * ctx)

Read Analog Value.

Parameters
ctxClick object.

@description This function read measurement using MCP3201 ADC integrated on click board.