mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Add stub for analogReference (#7809)
Fixes #6410 We actually provide a function prototype for `analogReference()` in `Arduino.h`, but no implementation. Add a dummy one that only supports DEFAULT (like other Arduino boards).
This commit is contained in:
parent
67e1dfc5a4
commit
adbd23b6e2
@ -39,4 +39,16 @@ extern int __analogRead(uint8_t pin)
|
|||||||
|
|
||||||
extern int analogRead(uint8_t pin) __attribute__ ((weak, alias("__analogRead")));
|
extern int analogRead(uint8_t pin) __attribute__ ((weak, alias("__analogRead")));
|
||||||
|
|
||||||
|
|
||||||
|
void __analogReference(uint8_t mode)
|
||||||
|
{
|
||||||
|
// Only DEFAULT is supported on the ESP8266
|
||||||
|
if (mode != DEFAULT) {
|
||||||
|
DEBUGV("analogReference called with illegal mode");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern void analogReference(uint8_t mode) __attribute__ ((weak, alias("__analogReference")));
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user