17#ifndef MBED_ANALOGOUT_H
18#define MBED_ANALOGOUT_H
20#include "platform/platform.h"
22#if DEVICE_ANALOGOUT || defined(DOXYGEN_ONLY)
24#include "hal/analogout_api.h"
25#include "rtos/Mutex.h"
144#if !defined(DOXYGEN_ONLY)
150 virtual void unlock()
An analog output, used for setting the voltage on a pin.
void write(float value)
Set the output voltage, specified as a percentage (float)
AnalogOut(PinName pin)
Create an AnalogOut connected to the specified pin.
float read()
Return the current output voltage setting, measured as a percentage (float)
AnalogOut & operator=(float percent)
An operator shorthand for write()
void write_u16(unsigned short value)
Set the output voltage, represented as an unsigned short in the range [0x0, 0xFFFF].
AnalogOut(const PinMap &pinmap)
Create an AnalogOut connected to the specified pin.
The Mutex class is used to synchronize the execution of threads.
void analogout_init(dac_t *obj, PinName pin)
Initialize the analogout peripheral.
void analogout_init_direct(dac_t *obj, const PinMap *pinmap)
Initialize the analogout peripheral.
void analogout_free(dac_t *obj)
Release the analogout object.
struct dac_s dac_t
Analogout hal structure.