130 #define MCP47XX_BASE_ADDR   (0x60)   
  139 #define MCP4706_CHN_NUM     (1)   
  140 #define MCP4716_CHN_NUM     (1)   
  141 #define MCP4725_CHN_NUM     (1)   
  142 #define MCP4726_CHN_NUM     (1)   
  143 #define MCP4728_CHN_NUM     (4)   
  144 #define MCP47XX_CHN_NUM_MAX (4)   
  234 #if IS_USED(MODULE_SAUL) || DOXYGEN 
DAC peripheral driver interface definition.
 
Low-level GPIO peripheral driver interface definitions.
 
void mcp47xx_dac_poweroff(mcp47xx_t *dev, uint8_t chn)
Disables the MCP47xx DAC device.
 
mcp47xx_error_codes_t
MCP47xx driver error codes.
 
mcp47xx_gain_t
MCP47xx gain configuration type.
 
void mcp47xx_dac_get(mcp47xx_t *dev, uint8_t chn, uint16_t *value)
Get the current value of a MCP47xx DAC channel.
 
int mcp47xx_dac_init(mcp47xx_t *dev, uint8_t chn)
Initialize a MCP47xx DAC channel.
 
void mcp47xx_dac_poweron(mcp47xx_t *dev, uint8_t chn)
Enables the MCP47xx DAC device.
 
mcp47xx_vref_t
MCP47xx V_REF configuration type.
 
void mcp47xx_dac_set(mcp47xx_t *dev, uint8_t chn, uint16_t value)
Write a value to a MCP47xx DAC channel.
 
int mcp47xx_init(mcp47xx_t *dev, const mcp47xx_params_t *params)
Initialize the MCP47xx DAC.
 
#define MCP47XX_CHN_NUM_MAX
maximum number of channels
 
mcp47xx_pd_mode_t
MCP47xx Power-down mode selection type.
 
uint8_t mcp47xx_dac_channels(mcp47xx_t *dev)
Returns the number of channels of MCP47xx DAC device.
 
mcp47xx_variant_t
Supported MCP47xx variants.
 
@ MCP47XX_ERROR_NOT_AVAIL
device not available
 
@ MCP47XX_ERROR_I2C
I2C communication error.
 
@ MCP47XX_GAIN_2X
Gain is 2.0, not supported by MCP4725.
 
@ MCP47XX_GAIN_1X
Gain is 1.0, supported by all MCP47xx variants.
 
@ MCP47XX_VREF_PIN
V_REF = VREF pin not buffered, MCP47x6 only.
 
@ MCP47XX_VREF_BUF
V_REF = VREF pin buffered, MCP47x6 only.
 
@ MCP47XX_VREF_VDD
V_REF = V_DD, supported by all MCP47xx.
 
@ MCP47XX_VREF_INT
V_REF = internal (2.048 V), MCP4728 only
 
@ MCP47XX_NORMAL
Normal mode.
 
@ MCP47XX_PD_MEDIUM
Power down, medium resistor, 125 kOhm for MCP47x6, 100 kOhm otherwise.
 
@ MCP47XX_PD_LARGE
Power down, large resistor, 640 kOhm for MCP47x6, 125 kOhm otherwise.
 
@ MCP47XX_PD_SMALL
Power down, small resistor 1 kOhm.
 
@ MCP4728
4 channel 12-bit DAC
 
@ MCP4726
1 channel 12-bit DAC
 
@ MCP4706
1 channel 8-bit DAC
 
@ MCP4725
1 channel 12-bit DAC
 
@ MCP4716
1 channel 10-bit DAC
 
uint_fast8_t i2c_t
Default i2c_t type definition.
 
Low-level I2C peripheral driver interface definition.
 
Common macros and compiler attributes/pragmas configuration.
 
MCP47xx device configuration parameters.
 
uint16_t addr
I2C slave address MCP47XX_BASE_ADDR + [0...7].
 
mcp47xx_vref_t vref
Voltage reference selection.
 
mcp47xx_gain_t gain
Gain selection.
 
mcp47xx_variant_t variant
used variant of MCP47xx
 
mcp47xx_pd_mode_t pd_mode
Power-down mode selection.
 
MCP47xx configuration structure for mapping DAC channels to SAUL.
 
unsigned int dev
index of the MCP47xx device
 
uint16_t initial
initial value
 
const char * name
name of the MCP47xx device
 
uint8_t channel
channel of the MCP47xx device
 
MCP47xx device data structure type.
 
mcp47xx_params_t params
device configuration parameters