RIOT-OS/RIOT — pull request #2018 by brummer-simon (2014-11-16 21:45:31+00:00)
Title: Basic DAC Driver, implementation on stm32f4discovery

- Creation of DAC Driver, much like the current ADC Driver.
- Implementation of the DAC Driver for the stm32f4discovery board.

dac_init(dac_t dev, dac_precision_t precision)
Initializing a DAC Device with a given precision, configures the Device and Channels.

dac_write(dac_t dev, uint8_t channel, uint16_t value)
Writes a value on a specific channel for a device.

dac_poweron(dac_t dev)
Enables a given DAC Device.

dac_poweroff(dac_t dev)
Disables a given DAC Device.

uint16_t dac_map(dac_t dev, int value, int min, int max)
Maps a integer value between interval min and max, to a valid integer to write onto the dac with respect to the selected precision.

uint16_t dac_mapf(dac_t dev, float value, float min, float max)
Maps a float value between interval min and max, to a valid integer to write onto the dac with respect to the selected precision.