|
I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
|
MCP4725 Driver. More...
#include "sarmfsw.h"#include "I2C_component.h"#include "I2C_peripheral.h"#include "MCP4725_proc.h"#include "MCP4725_ex.h"

Data Structures | |
| union | uMCP4725_REG__CMD |
| Union for CMD of MCP4725. More... | |
Macros | |
| #define | I2C_MCP4725_NB 1U |
| Number of MCP4725 peripherals. | |
| #define | MCP4725A0_ADDR 0x60U |
| MCP4725 address. | |
| #define | MCP4725A1_ADDR 0x62U |
| MCP4725 with A1 address. | |
| #define | MCP4725A2_ADDR 0x64U |
| MCP4725 with A2 address. | |
| #define | MCP4725_BASE_ADDR MCP4725A1_ADDR |
| MCP4725 Base address. | |
Enumerations | |
| enum | MCP4725_cmd { MCP4725__FAST_MODE = 0U , MCP4725__WRITE_DAC = 2U , MCP4725__WRITE_DAC_EEP , MCP4725__RESERVED_1 , MCP4725__RESERVED_2 , MCP4725__RESERVED_3 , MCP4725__RESERVED_4 } |
| Register map enum of MCP4725. More... | |
| enum | MCP4725_pd { MCP4725__PWR_NORMAL = 0U , MCP4725__PWR_DOWN_1K , MCP4725__PWR_DOWN_100K , MCP4725__PWR_DOWN_500K } |
| Power down enum of MCP4725. More... | |
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. | |
MCP4725 Driver.
MCP4725: 12-Bit Digital-to-Analog Converter with EEPROM Memory
| #define I2C_MCP4725_NB 1U |
Number of MCP4725 peripherals.
| #define MCP4725_BASE_ADDR MCP4725A1_ADDR |
MCP4725 Base address.
| #define MCP4725A0_ADDR 0x60U |
MCP4725 address.
| #define MCP4725A1_ADDR 0x62U |
MCP4725 with A1 address.
| #define MCP4725A2_ADDR 0x64U |
MCP4725 with A2 address.
| enum MCP4725_cmd |
Register map enum of MCP4725.
| enum MCP4725_pd |
| FctERR MCP4725_General_Call | ( | I2C_HandleTypeDef *const | hi2c, |
| const uint8_t | cmd ) |
I2C general call for MCP4725.
| [in] | hi2c | - pointer to general call I2C instance |
| [in] | cmd | - Command to send |

| FctERR MCP4725_Init | ( | const uint8_t | idx, |
| I2C_HandleTypeDef *const | hi2c, | ||
| const uint16_t | devAddress ) |
Initialization of the MCP4725 peripheral.
| [in] | idx | - MCP4725 index |
| [in] | hi2c | - pointer to MCP4725 I2C instance |
| [in] | devAddress | - MCP4725 device address |


| FctERR MCP4725_Init_Single | ( | void | ) |
Initialization for MCP4725 peripheral.

| FctERR MCP4725_Read | ( | I2C_slave_t *const | pSlave, |
| uint8_t * | data, | ||
| const uint16_t | nb ) |
I2C Read function for MCP4725.
| [in,out] | pSlave | - Pointer to I2C slave instance |
| [in,out] | data | - pointer to read to |
| [in] | nb | - Number of bytes to read |


| FctERR MCP4725_Write | ( | I2C_slave_t *const | pSlave, |
| const uint8_t * | data, | ||
| const uint16_t | nb ) |
I2C Write function for MCP4725.
| [in,out] | pSlave | - Pointer to I2C slave instance |
| [in] | data | - pointer to write from |
| [in] | nb | - Number of bytes to write |

