Skip to content

Remove yield macro #193

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
256dpi opened this issue Feb 10, 2017 · 2 comments
Closed

Remove yield macro #193

256dpi opened this issue Feb 10, 2017 · 2 comments

Comments

@256dpi
Copy link

256dpi commented Feb 10, 2017

The yield macro is very ambiguous and therefore conflicts with other libraries that use yield as a symbol.

Now, if other included code uses the identifier yield it gets replaced by the macro. We currently have this issue with the 256dpi/arduino-mqtt#56 library.

The best approach would be to declare a function that simply forwards the call:

// Before
#define yield() vPortYield()

// After
void yield() {
  vPortYield()
}
@me-no-dev
Copy link
Member

done :)

@256dpi
Copy link
Author

256dpi commented Feb 11, 2017

Thanks!

blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
brentru pushed a commit to adafruit/arduino-esp32 that referenced this issue Oct 22, 2024
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants