Skip to content

Commit

Permalink
Add dummy analogReference() for compatibility
Browse files Browse the repository at this point in the history
Reference:
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

Same as Arduino SAM Boards (Due)

Fix #403

Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Jun 5, 2019
1 parent 37fc844 commit dbf538e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cores/arduino/wiring_analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ static inline uint32_t mapResolution(uint32_t value, uint32_t from, uint32_t to)
}
}

void analogReference(eAnalogReference ulMode)
{
UNUSED(ulMode);
}

//perform the read operation on the selected analog pin.
//the initialization of the analog PIN is done through this function
Expand Down
1 change: 1 addition & 0 deletions cores/arduino/wiring_analog.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern "C" {

/*
* \brief SAM3 products have only one reference for ADC
* This is kept only for compatibility with existing AVR based API.
*/
typedef enum _eAnalogReference {
AR_DEFAULT,
Expand Down

0 comments on commit dbf538e

Please sign in to comment.