mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:52:44 +01:00
pkg/semtech-loramac: use netdev interface to set sleep state
This commit is contained in:
parent
0ea3b0bac1
commit
25a613ba93
@ -520,11 +520,13 @@ static void _semtech_loramac_event_cb(netdev_t *dev, netdev_event_t event)
|
||||
break;
|
||||
|
||||
case NETDEV_EVENT_TX_COMPLETE:
|
||||
sx127x_set_sleep((sx127x_t *)dev);
|
||||
{
|
||||
netopt_state_t sleep_state = NETOPT_STATE_SLEEP;
|
||||
dev->driver->set(dev, NETOPT_STATE, &sleep_state, sizeof(netopt_state_t));
|
||||
semtech_loramac_radio_events.TxDone();
|
||||
DEBUG("[semtech-loramac] Transmission completed\n");
|
||||
break;
|
||||
|
||||
}
|
||||
case NETDEV_EVENT_TX_TIMEOUT:
|
||||
msg.type = MSG_TYPE_TX_TIMEOUT;
|
||||
if (msg_send(&msg, semtech_loramac_pid) <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user