[riot-notifications] [RIOT-OS/RIOT] RDM: The 802.15.4 Radio HAL (#13943)
notifications at github.com
Wed May 13 22:35:03 CEST 2020
> I think low-level operations being blocking should be no problem. (Set state, wait for state change to complete)
It would be problematic if we want to have a single thread attending other work as well. And from the driver-implementation point of view this is not so natural as well. I would expect `set_trx_state(IDLE)` to be implemented something like this:
1. Configure transceiver to signal when PLL lock is reached
2. Send command(s) to bring the transceiver in IDLE state
3. Block the thread (e.g. via `mutex_lock()` on a locked mutex)
4. Unblock the thread from the ISR (e.g. via `mutex_unlock()`)
By dropping step 3. and instead signaling an event in step 4 we would have an async API, which could be turned into a blocking API with a slim layer above. I expect this would result in a minor reduction of code duplication and a few bytes more ROM in case of the slim layer above being used. But it could reduce RAM requirements hugely, if a network stack can be run in a single thread - even with multiple network devices being used.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications