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:
parent
c1d28d69a7
commit
8c0c603146
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user