8000 Corrected board definitions to include ESP8266 by ttytyper · Pull Request #6972 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Corrected board definitions to include ESP8266 #6972

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Corrected board definitions to include ESP8266
According to the sonoff_*.json board files from PlatformIO, the build flags are supposed to be ARDUINO_ESP8266_SONOFF_BASIC etc. However, pins_arduino.h expects them to be ARDUINO_SONOFF_BASIC etc, without ESP8266. This causes sketches that make use of i2c with Wire.h to fail, as the necessary pins do not get defined.

I suspect that pins_arduino.h is incorrect and propose this correction. My apologies if this is not the correct way to fix the issue - it's difficult to wrap my head around how the different frameworks, IDEs, build tools etc interact :)

Reference: https://github.com/platformio/platform-espressif8266/tree/develop/boards
  • Loading branch information
ttytyper authored Jan 1, 2020
commit a83fa1c9e30f023b013a919ffcc0548c123bf8f3
6 changes: 3 additions & 3 deletions variants/itead/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#if defined(ARDUINO_SONOFF_SV)
#if defined(ARDUINO_ESP8266_SONOFF_SV)
#define PIN_WIRE_SCL (5)
static const uint8_t SCL = PIN_WIRE_SCL;
#endif

#if defined(ARDUINO_SONOFF_TH) || defined(ARDUINO_SONOFF_BASIC)
#if defined(ARDUINO_ESP8266_SONOFF_TH) || defined(ARDUINO_ESP8266_SONOFF_BASIC)
#define PIN_WIRE_SCL (14)
static const uint8_t SCL = PIN_WIRE_SCL;
#endif

#if defined(ARDUINO_SONOFF_TH) || defined(ARDUINO_SONOFF_SV)
#if defined(ARDUINO_ESP8266_SONOFF_TH) || defined(ARDUINO_ESP8266_SONOFF_SV)
#define PIN_WIRE_SDA (4)
static const uint8_t SDA = PIN_WIRE_SDA;
#endif
Expand Down
0