1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/at86rf215: remove msg queue dependency

This commit is contained in:
Jose Alamos 2021-08-16 15:28:06 +02:00
parent c1d28d69a7
commit 8c0c603146
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9
2 changed files with 6 additions and 9 deletions

View File

@ -859,14 +859,18 @@ static void _tx_end(at86rf215_t *dev, netdev_event_t event)
static void _ack_timeout_cb(void* arg) {
at86rf215_t *dev = arg;
netdev_t *netdev = &dev->netdev.netdev;
dev->timeout = AT86RF215_TIMEOUT_ACK;
msg_send_int(&dev->timer_msg, dev->timer_msg.sender_pid);
netdev->event_callback(netdev, NETDEV_EVENT_ISR);
}
static void _backoff_timeout_cb(void* arg) {
at86rf215_t *dev = arg;
netdev_t *netdev = &dev->netdev.netdev;
dev->timeout = AT86RF215_TIMEOUT_CSMA;
msg_send_int(&dev->timer_msg, dev->timer_msg.sender_pid);
netdev->event_callback(netdev, NETDEV_EVENT_ISR);
}
static void _set_idle(at86rf215_t *dev)
@ -887,9 +891,6 @@ static void _set_idle(at86rf215_t *dev)
/* wake up the radio thread after ACK timeout */
static void _start_ack_timer(at86rf215_t *dev)
{
dev->timer_msg.type = NETDEV_MSG_TYPE_EVENT;
dev->timer_msg.sender_pid = thread_getpid();
dev->timer.arg = dev;
dev->timer.callback = _ack_timeout_cb;
@ -918,9 +919,6 @@ static void _start_backoff_timer(at86rf215_t *dev)
DEBUG("Set CSMA backoff to %"PRIu32" (be %u min %u max %u base: %"PRIu32")\n",
csma_backoff_usec, be, dev->csma_minbe, dev->csma_maxbe, base);
dev->timer_msg.type = NETDEV_MSG_TYPE_EVENT;
dev->timer_msg.sender_pid = thread_getpid();
dev->timer.arg = dev;
dev->timer.callback = _backoff_timeout_cb;

View File

@ -347,7 +347,6 @@ typedef struct at86rf215 {
const at86rf215_RF_regs_t *RF; /**< Radio Frontend Registers */
const at86rf215_BBC_regs_t *BBC; /**< Baseband Registers */
xtimer_t timer; /**< timer for ACK & CSMA timeout */
msg_t timer_msg; /**< message for timeout timer */
uint32_t ack_timeout_usec; /**< time to wait before retransmission in µs */
uint32_t csma_backoff_period; /**< CSMA Backoff period */
uint16_t flags; /**< Device specific flags */