Comments (5)
As always, PRs greatly appreciated!
But also - some justification as to why you would use native FreeRTOS queues and semaphores over Rust STD queues, mutexes and condvars and their Posix equivalents?
from esp-idf-hal.
My main concern is to ensure that when blocking waiting to send/recv on a queue/semaphore, the calling task is put into the FreeRTOS blocked state... otherwise things like tickless idling won't work, correct? Is this possible outside of native FreeRTOS queues?
from esp-idf-hal.
Things like Rust Mutex and RWLock as well as Rust queues then on top are implemented in terms of OS sync primitives. In our case - semaphores. So yes, your task will be put into a blocked state even when using the higher level constructs of Rust from above, as well as any Rust IO API from STD.
IMO native FreeRTOS queues, events, event sets and semaphores are only having an edge over their Rust wrappers when you are trying to signal such a primitive from an ISR, which is not supported with the Rust wrappers. But I've yet to see folks coming with such advanced use cases.
I'll close rhat now. Feel free to reopen in case you have counter arguments or you have in mind the ISR advanced use case. However for the latter, we already support typesafe bindings to FreeRTOS task notifications, which are the most efficient way for an ISR to awake a FreeRTOS task and pass some limited data anyway.
from esp-idf-hal.
Thanks Ivan, that's a super helpful explanation, I really appreciate it.
I almost always use task notifications from within ISRs, as you correctly recommend, so that's not an issue.
Also, off-topic, but is there a place of discussion for esp-rs? Like a discord or IRC?
Anything on this?
from esp-idf-hal.
Also, off-topic, but is there a place of discussion for esp-rs? Like a discord or IRC?
Anything on this?
Sorry I've missed that and yes, sure - we have a Matrix room.
from esp-idf-hal.
Related Issues (20)
- Measure of stack use at runtime HOT 2
- Light and Deep Sleep HOT 2
- Linking failure for some pthread stuff HOT 13
- Why are both arguments to the can interface outputs? HOT 1
- Need to change PWM frequency of LedcDriver HOT 1
- PinDriver's subscribe method and wait_for_* methods are incompatible HOT 11
- Propose: Set esp-idf version 4.3 as deprecated on next release. HOT 4
- CAN example HOT 6
- Cannot build HOT 1
- Could not find sys in esp_idf_hal HOT 2
- GPIO22 and GPIO23 missing for ESP32C6 HOT 2
- error: failed to run custom build command for `wasmtime-runtime v8.0.1` HOT 1
- espup: implement stable symlink to the libclang location HOT 36
- adc_cali_curve_fitting_config_t missing chan field HOT 3
- Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled. HOT 6
- trait DrawTarget is not implemented for ... Ssd1306 / esp_idf_hal::i2c::* HOT 2
- Compile error with uart HOT 1
- Stack overflow crashes since update to 0.42 HOT 3
- Error compiling esp-idf-hal with template project generated by esp-idf-template HOT 2
- example i2c_master_slave.rs uses GPIO22 which doesn't exist on esp32s3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-hal.