Skip to content

Commit 2929895

Browse files
committed
Analogin: add defined behavior
1 parent 6f7c1c9 commit 2929895

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

hal/analogin_api.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,29 @@ typedef struct analogin_s analogin_t;
3535

3636
/**
3737
* \defgroup hal_analogin Analogin hal functions
38+
*
39+
* # Defined behaviour
40+
* * The function ::analogin_init initializes the analogin peripheral
41+
* * The function ::analogin_read reads the input voltage, represented as a float in the range [0.0, 1.0]
42+
* * The function ::analogin_read_u16 reads the value from analogin pin, represented as an unsigned 16bit value
43+
*
44+
* # Undefined behaviour
45+
*
46+
* * ::analogin_init is called with invalid pin (which does not support analog input function)
47+
* * Calling ::analogin_read, ::analogin_read_u16 before ::analogin_init
3848
* @{
3949
*/
4050

51+
/**
52+
* \defgroup hal_analogin_tests Analogin hal tests
53+
* The Analogin HAL tests ensure driver conformance to defined behaviour.
54+
*
55+
* To run the Analogin hal tests use the command:
56+
*
57+
* mbed test -t <toolchain> -m <target> -n tests-mbed_hal_fpga_ci_test_shield-analogin
58+
*
59+
*/
60+
4161
/** Initialize the analogin peripheral
4262
*
4363
* Configures the pin used by analogin.

0 commit comments

Comments
 (0)