I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
MCP4725.c File Reference

MCP4725 Driver. More...

#include "MCP4725.h"
Include dependency graph for MCP4725.c:

Functions

FctERR MCP4725_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization of the MCP4725 peripheral.
 
FctERR MCP4725_Init_Single (void)
 Initialization for MCP4725 peripheral.
 
FctERR MCP4725_General_Call (I2C_HandleTypeDef *const hi2c, const uint8_t cmd)
 I2C general call for MCP4725.
 
FctERR MCP4725_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t nb)
 I2C Write function for MCP4725.
 
FctERR MCP4725_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t nb)
 I2C Read function for MCP4725.
 

Detailed Description

MCP4725 Driver.

Author
SMFSW

MCP4725: 12-Bit Digital-to-Analog Converter with EEPROM Memory

Function Documentation

◆ MCP4725_General_Call()

FctERR MCP4725_General_Call ( I2C_HandleTypeDef *const hi2c,
const uint8_t cmd )

I2C general call for MCP4725.

Parameters
[in]hi2c- pointer to general call I2C instance
[in]cmd- Command to send
Returns
FctERR - error code
Here is the caller graph for this function:

◆ MCP4725_Init()

FctERR MCP4725_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization of the MCP4725 peripheral.

Parameters
[in]idx- MCP4725 index
[in]hi2c- pointer to MCP4725 I2C instance
[in]devAddress- MCP4725 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP4725_Init_Single()

FctERR MCP4725_Init_Single ( void )

Initialization for MCP4725 peripheral.

Warning
In case multiple devices (defined by I2C_MCP4725_NB > 1), you shall use MCP4725_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ MCP4725_Read()

FctERR MCP4725_Read ( I2C_slave_t *const pSlave,
uint8_t * data,
const uint16_t nb )

I2C Read function for MCP4725.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MCP4725_Write()

FctERR MCP4725_Write ( I2C_slave_t *const pSlave,
const uint8_t * data,
const uint16_t nb )

I2C Write function for MCP4725.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: