sys/net/gnrc/gomach: update use of NETOPT_TX_END_IRQ and friends

With the API change, it is no longer possible to enable these IRQs at
run time. Instead, query if those are supported (with DEVELHELP).
This commit is contained in:
Marian Buschsieweke 2021-02-26 10:40:12 +01:00
parent d86df5b217
commit 94e0ef47c7
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -149,12 +149,16 @@ static void gomach_reinit_radio(gnrc_netif_t *netif)
sizeof(netif->l2addr)); sizeof(netif->l2addr));
} }
/* Enable RX-start and TX-started and TX-END interrupts. */ /* Check if RX-start and TX-started and TX-END interrupts are supported */
netopt_enable_t enable = NETOPT_ENABLE; if (IS_ACTIVE(DEVELHELP)) {
netif->dev->driver->set(netif->dev, NETOPT_RX_START_IRQ, &enable, sizeof(enable)); netopt_enable_t enable;
netif->dev->driver->set(netif->dev, NETOPT_RX_END_IRQ, &enable, sizeof(enable)); netif->dev->driver->get(netif->dev, NETOPT_RX_START_IRQ, &enable, sizeof(enable));
netif->dev->driver->set(netif->dev, NETOPT_TX_END_IRQ, &enable, sizeof(enable)); assert(enable == NETOPT_ENABLE);
netif->dev->driver->get(netif->dev, NETOPT_RX_END_IRQ, &enable, sizeof(enable));
assert(enable == NETOPT_ENABLE);
netif->dev->driver->get(netif->dev, NETOPT_TX_END_IRQ, &enable, sizeof(enable));
assert(enable == NETOPT_ENABLE);
}
} }
static void _gomach_rtt_cb(void *arg) static void _gomach_rtt_cb(void *arg)