Skip to content

implement yield() null function #54

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
ladyada opened this issue Nov 16, 2016 · 8 comments
Closed

implement yield() null function #54

ladyada opened this issue Nov 16, 2016 · 8 comments

Comments

@ladyada
Copy link
Contributor

ladyada commented Nov 16, 2016

for code compat!
can do nothing but example code is littered with yield() for esp8266 compatibility. yield exists in classic arduino, too :)

@igrr
Copy link
Member

igrr commented Nov 16, 2016

It may make sense to let yield actually call vPortYield.

@me-no-dev
Copy link
Member

hm... I thought I already added that... could have missed it :) will add it in a few

@ladyada
Copy link
Contributor Author

ladyada commented Nov 16, 2016

awesome thank you for all these really fast fixes - its making it really easy to port code & test it!

@me-no-dev
Copy link
Member

sure thing! let me know if you hit any other problem :) Do not know if you use PWM yet, but you can take a look at sigmaDelta and LEDC drivers in esp32-hal-*.h Since there is a separate PWM hardware that we do not have a driver for yet (it is much like AVR PWM), I opted not to implement analogWrite yet and instead give access to the available drivers through their own functions. I watched your video from Sunday and would like to give you a hand with the LCD driver if you want :)

@ladyada
Copy link
Contributor Author

ladyada commented Nov 16, 2016

haven't checked out pwm or analog write/read yet. i did get all the TFT/LCD drivers working but they work about 10x faster with bitbang than native SPI due to the mutex. which is totally ok but unexpected for most people. i could deeply optimize the libs but i like the current simplicity....

@me-no-dev
Copy link
Member

If more tailor-made api is used for ESP32, then we can mutex once per call. Another option is to expose methods for manual locking and and then skip mutex if already locked externally. I will look through your lib to see what can be done, but I can tell you that I have it here running at over 60FPS (all one of the cores does) so things can be made better for sure

@me-no-dev
Copy link
Member

Just to note, if bit-bang is used, there is nothing to prevent a user to concurrently trying to update the display from another thread/core. While I realize that Arduino users are not used to using threads, many will actually love the idea and we will see a slew of problems if we do not lock the hardware properly

@ladyada
Copy link
Contributor Author

ladyada commented Nov 16, 2016

not surprising 60 FPS is possible with blitting the entire display. its tougher when you have to update only a few pixels at a time. ill look making drawpixel/fillrect use only one SPI transaction or maybe have special ESP32 code

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

3 participants