Ifndef Not Working For RX2/TX2 Redefinition · Issue #4583 - GitHub

Skip to content Dismiss alert {{ message }} / arduino-esp32 Public
  • Notifications You must be signed in to change notification settings
  • Fork 7.8k
  • Star 15.9k
  • Code
  • Issues 112
  • Pull requests 15
  • Discussions
  • Actions
  • Projects 2
  • Wiki
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options ifndef not working for RX2/TX2 redefinition #4583New issueNew issueClosedClosedifndef not working for RX2/TX2 redefinition#4583LabelsStatus: StaleIssue is stale stage (outdated/stuck)@jshep321

Description

@jshep321jshep321opened on Nov 26, 2020

I am trying to redefine the pins for my serial port using Serial2 -- RX2/TX2. If I comment out the #define in HardwareSerial.cpp, everything works as expected with my new pins. This works:

#ifndef RX2 #define RX2 16 //default //#define RX2 14 //esp32cam available pin #endif #ifndef TX2 #define TX2 17 //default //#define TX2 15 //esp32cam available pin

However, if I #define them in my application, the defaults are used and the #ifndef are ignored. Any suggestions on how to make these visible without editing the (common file) HardwareSerial.cpp?

Metadata

Metadata

Assignees

No one assigned

Labels

Status: StaleIssue is stale stage (outdated/stuck)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Tag » Arduino Ifndef Not Working