nimble/ll: Move PHY checks to drivers

ble_phy.h should be hardware agnostic, let's move PHY checks to drivers
instead.
This commit is contained in:
Andrzej Kaczmarek
2019-10-21 15:00:10 +02:00
parent 1adb35da4b
commit 638978ac88
3 changed files with 14 additions and 8 deletions
@@ -26,14 +26,6 @@
extern "C" {
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY) && !(MYNEWT_VAL(BSP_NRF52) || MYNEWT_VAL(BSP_NRF52840))
#error LE 2M PHY can only be enabled on nRF52xxx
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY) && !MYNEWT_VAL(BSP_NRF52840)
#error LE Coded PHY can only be enabled on nRF52840
#endif
/* Forward declarations */
struct os_mbuf;
+8
View File
@@ -37,6 +37,14 @@
#include "core_cm0.h"
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY)
#error LE 2M PHY cannot be enabled on nRF51
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
#error LE Coded PHY cannot be enabled on nRF51
#endif
/* XXX: 4) Make sure RF is higher priority interrupt than schedule */
/*
+6
View File
@@ -38,6 +38,12 @@
#include "core_cm4.h"
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
#if !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52840) && !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52811)
#error LE Coded PHY can only be enabled on nRF52811 or nRF52840
#endif
#endif
/*
* NOTE: This code uses a couple of PPI channels so care should be taken when
* using PPI somewhere else.