mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #11134 from jia200x/pr/fix_semtech_netdev
pkg/semtech_loramac: add null guards to calls on radio_events descriptor
This commit is contained in:
commit
fa8031cf83
@ -630,12 +630,18 @@ static void _semtech_loramac_event_cb(netdev_t *dev, netdev_event_t event)
|
||||
|
||||
case NETDEV_EVENT_FHSS_CHANGE_CHANNEL:
|
||||
DEBUG("[semtech-loramac] FHSS channel change\n");
|
||||
semtech_loramac_radio_events.FhssChangeChannel(((sx127x_t *)dev)->_internal.last_channel);
|
||||
if(semtech_loramac_radio_events.FhssChangeChannel) {
|
||||
semtech_loramac_radio_events.FhssChangeChannel((
|
||||
(sx127x_t *)dev)->_internal.last_channel);
|
||||
}
|
||||
break;
|
||||
|
||||
case NETDEV_EVENT_CAD_DONE:
|
||||
DEBUG("[semtech-loramac] test: CAD done\n");
|
||||
semtech_loramac_radio_events.CadDone(((sx127x_t *)dev)->_internal.is_last_cad_success);
|
||||
if(semtech_loramac_radio_events.CadDone) {
|
||||
semtech_loramac_radio_events.CadDone((
|
||||
(sx127x_t *)dev)->_internal.is_last_cad_success);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user