Functions | |
| void | analogout_init (dac_t *obj, PinName pin) |
| Initialize the analogout peripheral. More... | |
| void | analogout_free (dac_t *obj) |
| Release the analogout object. More... | |
| void | analogout_write (dac_t *obj, float value) |
| Set the output voltage, specified as a percentage (float) More... | |
| void | analogout_write_u16 (dac_t *obj, uint16_t value) |
| Set the output voltage, specified as unsigned 16-bit. More... | |
| float | analogout_read (dac_t *obj) |
| Read the current voltage value on the pin. More... | |
| uint16_t | analogout_read_u16 (dac_t *obj) |
| Read the current voltage value on the pin, as a normalized unsigned 16bit value. More... | |
| const PinMap * | analogout_pinmap (void) |
| Get the pins that support analogout. More... | |
| void analogout_free | ( | dac_t * | obj | ) |
Release the analogout object.
Note: This is not currently used in the mbed-drivers
| obj | The analogout object |
| void analogout_init | ( | dac_t * | obj, |
| PinName | pin | ||
| ) |
Initialize the analogout peripheral.
Configures the pin used by analogout.
| obj | The analogout object to initialize |
| pin | The analogout pin name |
| const PinMap* analogout_pinmap | ( | void | ) |
| float analogout_read | ( | dac_t * | obj | ) |
Read the current voltage value on the pin.
| obj | The analogin object |
| uint16_t analogout_read_u16 | ( | dac_t * | obj | ) |
Read the current voltage value on the pin, as a normalized unsigned 16bit value.
| obj | The analogin object |
| void analogout_write | ( | dac_t * | obj, |
| float | value | ||
| ) |
Set the output voltage, specified as a percentage (float)
| obj | The analogin object |
| value | The floating-point output voltage to be set |
| void analogout_write_u16 | ( | dac_t * | obj, |
| uint16_t | value | ||
| ) |
Set the output voltage, specified as unsigned 16-bit.
| obj | The analogin object |
| value | The unsigned 16-bit output voltage to be set |