Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c9dfcfb

Browse files
committedMay 28, 2020
Update mbed to mbed-os-6.0.0-alpha-3-615-g41c2541014
1 parent cb86cd9 commit c9dfcfb

File tree

132 files changed

+197453
-197419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+197453
-197419
lines changed
 

‎cores/arduino/mbed/drivers/AnalogIn.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ class AnalogIn {
8080
*/
8181
AnalogIn(PinName pin);
8282

83+
84+
/** Reconfigure the adc object using the given configuration
85+
*
86+
* @param config reference to structure which holds AnalogIn configuration
87+
*/
88+
void configure(const analogin_config_t &config);
89+
8390
/** Read the input voltage, represented as a float in the range [0.0, 1.0]
8491
*
8592
* @returns A floating-point value representing the current input voltage, measured as a percentage

‎cores/arduino/mbed/hal/analogin_api.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ extern "C" {
3333
*/
3434
typedef struct analogin_s analogin_t;
3535

36+
/** Analogin configuration hal structure. analogin_config_s is declared in the target's hal
37+
*/
38+
typedef struct analogin_config_s analogin_config_t;
39+
3640
/**
3741
* \defgroup hal_analogin Analogin hal functions
3842
*
@@ -77,6 +81,15 @@ void analogin_init_direct(analogin_t *obj, const PinMap *pinmap);
7781
*/
7882
void analogin_init(analogin_t *obj, PinName pin);
7983

84+
/** Initialize the analogin peripheral
85+
*
86+
* Configures the pin used by analogin.
87+
* @param obj The analogin object to initialize
88+
* @param pin The analogin pin name
89+
* @param pinmap pointer to structure which holds analogin configuration
90+
*/
91+
void __attribute__((weak)) analogin_configure(analogin_t *obj, const analogin_config_t *config);
92+
8093
/** Release the analogin peripheral
8194
*
8295
* Releases the pin used by analogin.

0 commit comments

Comments
 (0)