tsch_init: check that a timeslot timing template is provided

This commit is contained in:
Simon Duquennoy 2018-10-04 10:43:41 +02:00
parent 3ace2b93f6
commit 7c5977d9f7

View File

@ -899,6 +899,12 @@ tsch_init(void)
radio_value_t radio_tx_mode;
rtimer_clock_t t;
/* Check that the platform provides a TSCH timeslot timing template */
if(TSCH_DEFAULT_TIMESLOT_TIMING == NULL) {
LOG_ERR("! platform does not provide a timeslot timing template.\n");
return;
}
/* Radio Rx mode */
if(NETSTACK_RADIO.get_value(RADIO_PARAM_RX_MODE, &radio_rx_mode) != RADIO_RESULT_OK) {
LOG_ERR("! radio does not support getting RADIO_PARAM_RX_MODE. Abort init.\n");