mirror of https://github.com/ARMmbed/mbed-os.git
Analogin: Add analogin_free() function to HAL
parent
6e31c14f2e
commit
05d8e1bb89
|
@ -38,6 +38,7 @@ typedef struct analogin_s analogin_t;
|
||||||
*
|
*
|
||||||
* # Defined behaviour
|
* # Defined behaviour
|
||||||
* * The function ::analogin_init initializes the analogin_t control structure
|
* * The function ::analogin_init initializes the analogin_t control structure
|
||||||
|
* * The function ::analogin_free returns the pin owned by the Analogin object to its reset state
|
||||||
* * The function ::analogin_read reads the input voltage, represented as a float in the range [0.0 (GND), 1.0 (VCC)]
|
* * The function ::analogin_read reads the input voltage, represented as a float in the range [0.0 (GND), 1.0 (VCC)]
|
||||||
* * The function ::analogin_read_u16 reads the value from analogin pin, represented as an unsigned 16bit value [0.0 (GND), MAX_UINT16 (VCC)]
|
* * The function ::analogin_read_u16 reads the value from analogin pin, represented as an unsigned 16bit value [0.0 (GND), MAX_UINT16 (VCC)]
|
||||||
* * The accuracy of the ADC is +/- 10%
|
* * The accuracy of the ADC is +/- 10%
|
||||||
|
@ -68,6 +69,13 @@ typedef struct analogin_s analogin_t;
|
||||||
*/
|
*/
|
||||||
void analogin_init(analogin_t *obj, PinName pin);
|
void analogin_init(analogin_t *obj, PinName pin);
|
||||||
|
|
||||||
|
/** Release the analogin peripheral
|
||||||
|
*
|
||||||
|
* Releases the pin used by analogin.
|
||||||
|
* @param obj The analogin object to initialize
|
||||||
|
*/
|
||||||
|
void analogin_free(analogin_t *obj);
|
||||||
|
|
||||||
/** Read the input voltage, represented as a float in the range [0.0, 1.0]
|
/** Read the input voltage, represented as a float in the range [0.0, 1.0]
|
||||||
*
|
*
|
||||||
* @param obj The analogin object
|
* @param obj The analogin object
|
||||||
|
|
Loading…
Reference in New Issue