| 
    modm API documentation
    
   | 
 
#include <modm/platform/dac/dac.hpp>
Public Types | |
| enum | Channel : uint8_t { Channel1 = 0, Channel2 = 1 } | 
Static Public Member Functions | |
| template<class... Signals> | |
| static void | connect () | 
| static void | initialize () | 
| static void | enableChannel (Channel chan) | 
| static void | disableChannel (Channel chan) | 
| static void | enableOutputBuffer (Channel chan, bool enable) | 
| static void | setOutput (Channel chan, uint16_t value) | 
| static void | setOutput1 (uint16_t value) | 
| static void | setOutput2 (uint16_t value) | 
| template<class Gpio > | |
| static constexpr Channel | getPinChannel () | 
| Get the channel for a Pin.  | |
Digital-to-Analog Converter (DAC)
Supports simple synchronous access to the 2-channel DAC found on most STM32 microcontrollers.
      
  | 
  strong | 
The DAC has two output channels, Channel1 and Channel2
      
  | 
  static | 
Disable DAC output for the given channel
| chan | The channel to be disabled | 
      
  | 
  static | 
Enable DAC output for the given channel
| chan | The channel to be enabled | 
      
  | 
  static | 
Control the output buffer setting
| chan | The channel to enable/disable the output buffer on | 
| enable | true to turn on the output buffer, false to turn it off | 
      
  | 
  static | 
      
  | 
  inlinestatic | 
Set the output voltage for a DAC channel
| chan | The channel to set | 
| value | The 12-bit DAC output value, range 0-4095. | 
      
  | 
  inlinestatic | 
Set output value for Channel1
Equivalent to setOutput(modm::platform::Dac::Channel1, value)
| value | The 12-bit DAC output value, range 0-4095 | 
      
  | 
  inlinestatic | 
Set output value for Channel2
Equivalent to setOutput(modm::platform::Dac::Channel2, value)
| value | The 12-bit DAC output value, range 0-4095 |