cc2538-rf and cc1200: only include implementation of RADIO_CONST_TSCH_TIMING when TSCH is enabled

This commit is contained in:
Simon Duquennoy 2018-10-03 13:44:48 +02:00
parent 5497dc1e20
commit f79a19eaab
2 changed files with 4 additions and 0 deletions

View File

@ -972,6 +972,7 @@ get_object(radio_param_t param, void *dest, size_t size)
return RADIO_RESULT_OK;
}
#if MAC_CONF_WITH_TSCH
if(param == RADIO_CONST_TSCH_TIMING) {
if(size != sizeof(uint16_t *) || !dest) {
return RADIO_RESULT_INVALID_VALUE;
@ -979,6 +980,7 @@ get_object(radio_param_t param, void *dest, size_t size)
*(uint16_t **)dest = tsch_timeslot_timing_us_10000;
return RADIO_RESULT_OK;
}
#endif /* MAC_CONF_WITH_TSCH */
return RADIO_RESULT_NOT_SUPPORTED;
}

View File

@ -1364,6 +1364,7 @@ get_object(radio_param_t param, void *dest, size_t size)
return RADIO_RESULT_OK;
}
#if MAC_CONF_WITH_TSCH
if(param == RADIO_CONST_TSCH_TIMING) {
if(size != sizeof(uint16_t *) || !dest) {
return RADIO_RESULT_INVALID_VALUE;
@ -1371,6 +1372,7 @@ get_object(radio_param_t param, void *dest, size_t size)
*(uint16_t **)dest = CC1200_RF_CFG.tsch_timing;
return RADIO_RESULT_OK;
}
#endif /* MAC_CONF_WITH_TSCH */
return RADIO_RESULT_NOT_SUPPORTED;