All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

Default configuration for Microchip MCP47xx DAC with I2C interface. More...

Detailed Description

Default configuration for Microchip MCP47xx DAC with I2C interface.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file mcp47xx_params.h.

#include "board.h"
#include "mcp47xx.h"
#include "saul_reg.h"
#include "saul/periph.h"
+ Include dependency graph for mcp47xx_params.h:

Go to the source code of this file.

Variables

static const mcp47xx_params_t mcp47xx_params []
 Allocate some memory to store the actual configuration.
 
static const mcp47xx_saul_dac_params_t mcp47xx_saul_dac_params []
 Additional meta information to keep in the SAUL registry.
 

Set default configuration parameters

#define MCP47XX_PARAM_VARIANT   (MCP4725)
 Default MCP47xx variant.
 
#define MCP47XX_PARAM_DEV   I2C_DEV(0)
 Default I2C device.
 
#define MCP47XX_PARAM_ADDR   (MCP47XX_BASE_ADDR + 2)
 Default I2C slave address as offset to MCP47XX_BASE_ADDR.
 
#define MCP47XX_PARAM_GAIN   (MCP47XX_GAIN_1X)
 Default MCP47xx gain selection.
 
#define MCP47XX_PARAM_VREF   (MCP47XX_VREF_VDD)
 Default MCP47xx V_REF selection.
 
#define MCP47XX_PARAM_PD_MODE   (MCP47XX_PD_LARGE)
 Default MCP47xx Power-Down mode selection.
 
#define MCP47XX_PARAMS
 Default MCP47xx configuration parameters.
 
#define MCP47XX_SAUL_DAC_PARAMS
 Example for mapping DAC channels to SAUL.
 

Macro Definition Documentation

◆ MCP47XX_PARAM_ADDR

#define MCP47XX_PARAM_ADDR   (MCP47XX_BASE_ADDR + 2)

Default I2C slave address as offset to MCP47XX_BASE_ADDR.

Definition at line 45 of file mcp47xx_params.h.

◆ MCP47XX_PARAM_DEV

#define MCP47XX_PARAM_DEV   I2C_DEV(0)

Default I2C device.

Definition at line 40 of file mcp47xx_params.h.

◆ MCP47XX_PARAM_GAIN

#define MCP47XX_PARAM_GAIN   (MCP47XX_GAIN_1X)

Default MCP47xx gain selection.

Definition at line 50 of file mcp47xx_params.h.

◆ MCP47XX_PARAM_PD_MODE

#define MCP47XX_PARAM_PD_MODE   (MCP47XX_PD_LARGE)

Default MCP47xx Power-Down mode selection.

Definition at line 60 of file mcp47xx_params.h.

◆ MCP47XX_PARAM_VARIANT

#define MCP47XX_PARAM_VARIANT   (MCP4725)

Default MCP47xx variant.

Definition at line 35 of file mcp47xx_params.h.

◆ MCP47XX_PARAM_VREF

#define MCP47XX_PARAM_VREF   (MCP47XX_VREF_VDD)

Default MCP47xx V_REF selection.

Definition at line 55 of file mcp47xx_params.h.

◆ MCP47XX_PARAMS

#define MCP47XX_PARAMS
Value:
{ \
.addr = MCP47XX_PARAM_ADDR, \
.variant = MCP47XX_PARAM_VARIANT, \
.gain = MCP47XX_PARAM_GAIN, \
.vref = MCP47XX_PARAM_VREF, \
.pd_mode = MCP47XX_PARAM_PD_MODE, \
},
#define MCP47XX_PARAM_GAIN
Default MCP47xx gain selection.
#define MCP47XX_PARAM_DEV
Default I2C device.
#define MCP47XX_PARAM_ADDR
Default I2C slave address as offset to MCP47XX_BASE_ADDR.
#define MCP47XX_PARAM_VREF
Default MCP47xx V_REF selection.
#define MCP47XX_PARAM_VARIANT
Default MCP47xx variant.
#define MCP47XX_PARAM_PD_MODE
Default MCP47xx Power-Down mode selection.

Default MCP47xx configuration parameters.

Definition at line 65 of file mcp47xx_params.h.

◆ MCP47XX_SAUL_DAC_PARAMS

#define MCP47XX_SAUL_DAC_PARAMS
Value:
{ \
.name = "DAC00", \
.dev = 0, \
.channel = 0, \
.initial = 32768, \
},

Example for mapping DAC channels to SAUL.

Definition at line 77 of file mcp47xx_params.h.

Variable Documentation

◆ mcp47xx_params

const mcp47xx_params_t mcp47xx_params[]
static
Initial value:
=
{
}
#define MCP47XX_PARAMS
Default MCP47xx configuration parameters.

Allocate some memory to store the actual configuration.

Definition at line 89 of file mcp47xx_params.h.

◆ mcp47xx_saul_dac_params

const mcp47xx_saul_dac_params_t mcp47xx_saul_dac_params[]
static
Initial value:
=
{
}
#define MCP47XX_SAUL_DAC_PARAMS
Example for mapping DAC channels to SAUL.

Additional meta information to keep in the SAUL registry.

Definition at line 98 of file mcp47xx_params.h.