8000 Add stub for analogReference by earlephilhower · Pull Request #7809 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Add stub for analogReference #7809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add stub for analogReference
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).
  • Loading branch information
earlephilhower committed Jan 5, 2021
commit d3b7b5d81b28601e833264f9f5e76b776d4b3b4f
12 changes: 12 additions & 0 deletions cores/esp8266/core_esp8266_wiring_analog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,16 @@ extern int __analogRead(uint8_t pin)

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")));

};
0