netdev: add netdev_trigger_event_isr() function#13562
netdev: add netdev_trigger_event_isr() function#13562kaspar030 merged 2 commits intoRIOT-OS:masterfrom
Conversation
drivers/include/net/netdev.h
Outdated
| /** | ||
| * @brief Informs netdev there was an interrupt request from the network device. | ||
| * | ||
| * This function calls @ref event_callback with NETDEV_EVENT_ISR event. |
There was a problem hiding this comment.
The @ref event_callback is undefined here (see travis)
There was a problem hiding this comment.
| * This function calls @ref event_callback with NETDEV_EVENT_ISR event. | |
| * This function calls netdev_t::event_callback with NETDEV_EVENT_ISR event. |
|
There are a number of remaining calls in:
Is there a reason why these are omitted from the cleanup here? Or are they more complex and should they be handled in a follow-up? |
|
And please rebase :) |
Oh, good catch! I don't know how I missed those. Thanks, I will add them |
5e39d1a to
8b40aeb
Compare
bb72276 to
701c7db
Compare
|
done! |
|
Looks good, please squash! |
701c7db to
3254435
Compare
|
squashed :) |
|
Why |
Hmmmm I named it like that because it should be called at the end of IRQ. But strictly speaking it could be called from anywhere during ISR. |
We're bikeshedding again, sorry. |
I'd say, @jia200x renames it to one of either and squashes immediately. And then let's go with that. |
I will rename it to that and squash immediately. |
3254435 to
3e42fb7
Compare
|
done! |
maybe fix the commit messages |
3e42fb7 to
3ad574a
Compare
|
forgot that. Now it should be OK |
|
all green :) |
|
thanks for the review guys! |
Contribution description
This PR adds a
netdev_irq_endfunction that wraps thedev->event_callback(dev, NETDEV_EVENT_ISR)call.This is a step required in order to separate ISR signals from driver events (RX_DONE, TX_DONE), etc. This is useful when network stacks have different implementations of driver events but they use the same "recv thread".
I will introduce a
netdev_event_threadmodule that redefines this function to use theevent_threadmodule for handling device ISRs.Testing procedure
This should be low hanging fruit. Check if
netdevdrivers still compile (at86rf2xx, ethos).Running
gnrc_networkingon native should be enough to test functionality.Issues/PRs references
None so far