37 * \defgroup hal_analogout Analogout hal functions
38 *
39 * # Defined behaviour
40 * * The function ::analogout_init initializes the dac_t control structure
41 * * The function ::analogout_write sets the output voltage, specified as a percentage (float) in range [0.0 (GND), 1.0 (VCC)]
42 * * The function ::analogout_write_u16 sets the output voltage, specified as unsigned 16-bit value [0 (GND), MAX_UINT16 (VCC)]
43 * * The function ::analogout_read reads the current voltage value on the pin and returns a floating-point value representing the current voltage in range [0.0 (GND), 1.0 (VCC)]
44 * * The function ::analogout_read_u16 reads the current voltage value on the pin and returns the output voltage, specified as unsigned 16-bit value [0 (GND), MAX_UINT16 (VCC)]
45 * * The accuracy of the DAC is +/- 10%
46 * * The DAC operations ::analogout_write, ::analogout_write_u16, ::analogout_read, ::analogout_read_u16 take less than 20us to complete
47 * * The function ::analogout_free releases the analogout object
48 *
49 * # Undefined behaviour
50 *
51 * * ::analogout_init is called with invalid pin (which does not support analog output function)
52 * * Calling other functions before ::analogout_init
53 * @{
54 */
55
56/**
57 * \defgroup hal_analogin_tests Analogout hal tests
58 * The Analogout HAL tests ensure driver conformance to defined behaviour.
59 *
60 * To run the Analogout hal tests use the command:
61 *
62 * mbed test -t <toolchain> -m <target> -n tests-mbed_hal_fpga_ci_test_shield-analogout
63 *
64 */
65
66/** Initialize the analogout peripheral
67 *
68 * Configures the pin used by analogout.
69 * @param obj The analogout object to initialize
70 * @param pinmap pointer to structure which holds static pinmap
Set the output voltage, specified as unsigned 16-bit.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.