libyggdrasil  v1.0.0
dac.cpp File Reference

DAC abstraction implementation for Midgard. More...

#include <yggdrasil.h>
#include <cpp/common/attributes.hpp>
#include <cpp/common/types.hpp>
#include <cpp/common/utils.hpp>
#include <c/midgard/driver/dac.h>
#include <math.h>
Include dependency graph for dac.cpp:

Functions

bool yggdrasil_DAC_Init (dac_t adc)
 DAC init function. More...
 
bool yggdrasil_DAC_Deinit (dac_t adc)
 DAC deinit function. More...
 
C_LINKAGE void yggdrasil_DAC_Write (dac_t dac, float value)
 Set the dac value to the channel specified in the DAC handle. More...
 
C_LINKAGE float yggdrasil_DAC_Read (dac_t dac)
 Get the dac value from the channel specified in the DAC handle. More...
 

Detailed Description

DAC abstraction implementation for Midgard.

Author
Fabian Weber, Nikolaij Saegesser

Function Documentation

◆ yggdrasil_DAC_Deinit()

bool yggdrasil_DAC_Deinit ( dac_t  dac)

DAC deinit function.

Parameters
dacDAC handle
Returns
Success

◆ yggdrasil_DAC_Init()

bool yggdrasil_DAC_Init ( dac_t  dac)

DAC init function.

Parameters
dacDAC handle
Returns
Success

◆ yggdrasil_DAC_Read()

C_LINKAGE float yggdrasil_DAC_Read ( dac_t  dac)

Get the dac value from the channel specified in the DAC handle.

Parameters
dacDAC handle
Returns
DAC value

◆ yggdrasil_DAC_Write()

C_LINKAGE void yggdrasil_DAC_Write ( dac_t  dac,
float  value 
)

Set the dac value to the channel specified in the DAC handle.

Parameters
dacDAC handle
valueDAC value