mcp16331inv 2.0.0.0
mcp16331inv.h File Reference

This file contains API for MCP16331 INV Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  mcp16331inv_t
 Click ctx object definition. More...
 
struct  mcp16331inv_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MCP16331INV_MAP_MIKROBUS(cfg, mikrobus)
 
#define MCP16331INV_RETVAL   uint8_t
 
#define MCP16331INV_OK   0x00
 
#define MCP16331INV_INIT_ERROR   0xFF
 
#define MCP16331INV_ENABLE_VIN_PULL_UP   1
 
#define MCP16331INV_DISABLE_VIN_PULL_UP   0
 
#define MCP16331INV_GAIN_1X_VREF   1
 
#define MCP16331INV_GAIN_2X_VREF   0
 
#define MCP16331INV_ACTIVE_MODE   1
 
#define MCP16331INV_SHUTDOWN_MODE   0
 
#define MCP16331INV_MIN_2715_MV_1X_GAIN   0x0000
 
#define MCP16331INV_2900_MV_1X_GAIN   0x00F5
 
#define MCP16331INV_3000_MV_1X_GAIN   0x017A
 
#define MCP16331INV_3100_MV_1X_GAIN   0x01FE
 
#define MCP16331INV_3300_MV_1X_GAIN   0x02FE
 
#define MCP16331INV_3500_MV_1X_GAIN   0x03FF
 
#define MCP16331INV_3700_MV_1X_GAIN   0x04FF
 
#define MCP16331INV_3900_MV_1X_GAIN   0x05FF
 
#define MCP16331INV_4000_MV_1X_GAIN   0x0690
 
#define MCP16331INV_4300_MV_1X_GAIN   0x0810
 
#define MCP16331INV_5000_MV_1X_GAIN   0x0BAE
 
#define MCP16331INV_5200_MV_1X_GAIN   0x0CAF
 
#define MCP16331INV_5300_MV_1X_GAIN   0x0D3F
 
#define MCP16331INV_MAX_5400_MV_1X_GAIN   0x0FFF
 
#define MCP16331INV_MIN_2715_MV_2X_GAIN   0x0000
 
#define MCP16331INV_3000_MV_2X_GAIN   0x00B8
 
#define MCP16331INV_3500_MV_2X_GAIN   0x01FF
 
#define MCP16331INV_3900_MV_2X_GAIN   0x02FF
 
#define MCP16331INV_4400_MV_2X_GAIN   0x044F
 
#define MCP16331INV_4800_MV_2X_GAIN   0x0558
 
#define MCP16331INV_4900_MV_2X_GAIN   0x0590
 
#define MCP16331INV_5000_MV_2X_GAIN   0x05D0
 
#define MCP16331INV_5300_MV_2X_GAIN   0x0690
 
#define MCP16331INV_MAX_5400_MV_2X_GAIN   0x0FFF
 

Functions

void mcp16331inv_cfg_setup (mcp16331inv_cfg_t *cfg)
 Config Object Initialization function.
 
MCP16331INV_RETVAL mcp16331inv_init (mcp16331inv_t *ctx, mcp16331inv_cfg_t *cfg)
 Initialization function.
 
void mcp16331inv_generic_transfer (mcp16331inv_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void mcp16331inv_set_dac_vout (mcp16331inv_t *ctx, uint16_t dac_value, uint8_t gain_value, uint8_t mode)
 DAC output voltage set function.
 
void mcp16331inv_enable_vin (mcp16331inv_t *ctx, uint8_t state)
 VIN Pull Up enable function.
 

Detailed Description

This file contains API for MCP16331 INV Click driver.