|
struct dac * | dac_init (uint32_t index, uint8_t bits) |
|
int32_t | dac_deinit (struct dac *dac) |
|
int32_t | dac_set (struct dac *dac, uint32_t data, TickType_t waittime) |
|
int32_t | dac_setISR (struct dac *dac, uint32_t data) |
|
This is the DAC Subsystem for controlling DAC of a SOC.
◆ dac_deinit()
int32_t dac_deinit |
( |
struct dac * |
dac | ) |
|
Deinit DAC
- Parameters
-
- Returns
- -1 on error 0 on ok
◆ dac_init()
struct dac* dac_init |
( |
uint32_t |
index, |
|
|
uint8_t |
bits |
|
) |
| |
init DAC instance
- Parameters
-
index | Index of PWM |
bits | bit width of DAC common: 4, 8, 12. 0 on only set instance |
- Returns
- DAC Instance NULL on Error if only set instance on bits == 0
◆ dac_set()
int32_t dac_set |
( |
struct dac * |
dac, |
|
|
uint32_t |
data, |
|
|
TickType_t |
waittime |
|
) |
| |
Get DAC Value
- Parameters
-
dac | DAC instance |
waittime | max waittime in mutex or isr lock see xSemaphoreTake() |
- Returns
- -1 on error >= 0 Value
◆ dac_setISR()
int32_t dac_setISR |
( |
struct dac * |
dac, |
|
|
uint32_t |
data |
|
) |
| |
Get DAC Value in Interrupt Service Routine
- Parameters
-
- Returns
- -1 on error >= 0 Value