mcp16331 2.0.0.0
Public function

Functions

void mcp16331_cfg_setup (mcp16331_cfg_t *cfg)
 Config Object Initialization function.
 
MCP16331_RETVAL mcp16331_init (mcp16331_t *ctx, mcp16331_cfg_t *cfg)
 Initialization function.
 
void mcp16331_generic_transfer (mcp16331_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void mcp16331_set_vout (mcp16331_t *ctx, uint16_t millivolts_vout)
 mcp16331 set vout
 

Detailed Description

Function Documentation

◆ mcp16331_cfg_setup()

void mcp16331_cfg_setup ( mcp16331_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.

◆ mcp16331_generic_transfer()

void mcp16331_generic_transfer ( mcp16331_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

◆ mcp16331_init()

MCP16331_RETVAL mcp16331_init ( mcp16331_t * ctx,
mcp16331_cfg_t * cfg )

Initialization function.

Parameters
mcp16331Click object.
cfgClick configuration structure.

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

◆ mcp16331_set_vout()

void mcp16331_set_vout ( mcp16331_t * ctx,
uint16_t millivolts_vout )

mcp16331 set vout

Parameters
ctxClick object.
millivolts_voutOutput voltage in millivolts

@description This function sets the output voltage to selected value.