mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Functions | |
void | analogout_init (dac_t *obj, PinName pin) |
Initialize the analogout peripheral. | |
void | analogout_free (dac_t *obj) |
Release the analogout object. | |
void | analogout_write (dac_t *obj, float value) |
Set the output voltage, specified as a percentage (float) | |
void | analogout_write_u16 (dac_t *obj, uint16_t value) |
Set the output voltage, specified as unsigned 16-bit. | |
float | analogout_read (dac_t *obj) |
Read the current voltage value on the pin. | |
uint16_t | analogout_read_u16 (dac_t *obj) |
Read the current voltage value on the pin, as a normalized unsigned 16bit value. |
Function Documentation
void analogout_free | ( | dac_t * | obj ) |
Release the analogout object.
Note: This is not currently used in the mbed-drivers
- Parameters:
-
obj The analogout object
void analogout_init | ( | dac_t * | obj, |
PinName | pin | ||
) |
Initialize the analogout peripheral.
Configures the pin used by analogout.
- Parameters:
-
obj The analogout object to initialize pin The analogout pin name
float analogout_read | ( | dac_t * | obj ) |
Read the current voltage value on the pin.
- Parameters:
-
obj The analogin object
- Returns:
- A floating-point value representing the current voltage on the pin, measured as a percentage
uint16_t analogout_read_u16 | ( | dac_t * | obj ) |
Read the current voltage value on the pin, as a normalized unsigned 16bit value.
- Parameters:
-
obj The analogin object
- Returns:
- An unsigned 16-bit value representing the current voltage on the pin
void analogout_write | ( | dac_t * | obj, |
float | value | ||
) |
Set the output voltage, specified as a percentage (float)
- Parameters:
-
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.
- Parameters:
-
obj The analogin object value The unsigned 16-bit output voltage to be set
Generated on Wed Jul 13 2022 02:23:49 by 1.7.2