Skip to content

Commit dbf538e

Browse files
committed
Add dummy analogReference() for compatibility
Reference: https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/ Same as Arduino SAM Boards (Due) Fix stm32duino#403 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 37fc844 commit dbf538e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cores/arduino/wiring_analog.c

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ static inline uint32_t mapResolution(uint32_t value, uint32_t from, uint32_t to)
5959
}
6060
}
6161

62+
void analogReference(eAnalogReference ulMode)
63+
{
64+
UNUSED(ulMode);
65+
}
6266

6367
//perform the read operation on the selected analog pin.
6468
//the initialization of the analog PIN is done through this function

cores/arduino/wiring_analog.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ extern "C" {
2525

2626
/*
2727
* \brief SAM3 products have only one reference for ADC
28+
* This is kept only for compatibility with existing AVR based API.
2829
*/
2930
typedef enum _eAnalogReference {
3031
AR_DEFAULT,

0 commit comments

Comments
 (0)