diff --git a/components/802.15.4_RF/stm-s2lp-rf-driver/source/rf_configuration.c b/components/802.15.4_RF/stm-s2lp-rf-driver/source/rf_configuration.c index 888a0ba883..508adbd636 100644 --- a/components/802.15.4_RF/stm-s2lp-rf-driver/source/rf_configuration.c +++ b/components/802.15.4_RF/stm-s2lp-rf-driver/source/rf_configuration.c @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT) + #include "nanostack/platform/arm_hal_phy.h" #include "rf_configuration.h" @@ -167,3 +170,6 @@ uint32_t rf_conf_calculate_deviation(phy_modulation_index_e modulation_index, ui } return deviation; } + +#endif // MBED_CONF_NANOSTACK_CONFIGURATION && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT) +