mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
link_layer/gomach: use event queue for ISR offload
This commit is contained in:
parent
081dfe0e64
commit
6040747f33
@ -23,6 +23,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "event.h"
|
||||
#include "random.h"
|
||||
#include "timex.h"
|
||||
#include "periph/rtt.h"
|
||||
@ -2031,14 +2032,7 @@ static void _gomach_event_cb(netdev_t *dev, netdev_event_t event)
|
||||
gnrc_netif_t *netif = (gnrc_netif_t *) dev->context;
|
||||
|
||||
if (event == NETDEV_EVENT_ISR) {
|
||||
msg_t msg;
|
||||
|
||||
msg.type = NETDEV_MSG_TYPE_EVENT;
|
||||
msg.content.ptr = (void *) netif;
|
||||
|
||||
if (msg_send(&msg, netif->pid) <= 0) {
|
||||
DEBUG("[GOMACH] gnrc_netdev: possibly lost interrupt.\n");
|
||||
}
|
||||
event_post(&netif->evq, &netif->event_isr);
|
||||
}
|
||||
else {
|
||||
DEBUG("gnrc_netdev: event triggered -> %i\n", event);
|
||||
|
Loading…
Reference in New Issue
Block a user