| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Modules | Functions
MCP4725 digital DAC driver
Components drivers

MCP4725 digital DAC driver. More...

## Modules
| MCP4725 digital DAC driver configuration

## Functions
ret_code_t | mcp4725_setup (void)
| Function for setting up the driver. More...
ret_code_t | mcp4725_set_voltage (uint16_t val, bool write_eeprom)
| Function for setting new value to DAC. More...
bool | mcp4725_is_busy (void)
| Function for checking if DAC is busy saving data in EEPROM. More...

## Detailed Description

MCP4725 digital DAC driver.

## Function Documentation

bool mcp4725_is_busy | ( | void |  | ) |

Function for checking if DAC is busy saving data in EEPROM.

Return values

  true | If DAC is busy.
  false | If Dac is not busy.

ret_code_t mcp4725_set_voltage | ( | uint16_t | val,
|  | bool | write_eeprom
| ) |  |

Function for setting new value to DAC.

Parameters

  [in] | val | 12-bit value. Base on it voltage is set (Vout = (val/4095) * Vcc).
  [in] | write_eeprom | Defines if value will be written to DAC only or to EEPROM memmory also.

Returns
  Values returned by nrf_drv_twi_tx.

ret_code_t mcp4725_setup | ( | void |  | ) |

Function for setting up the driver.

Returns
  Values returned by nrf_drv_twi_init.