Explorar el Código

解决 controller 编译问题

greedyhao hace 4 años
padre
commit
aa16d424ac

+ 5 - 0
SConscript

@@ -147,6 +147,11 @@ if GetDepend(['PKG_NIMBLE_CTLR']):
         nimble/controller/src/ble_ll_scan.c
         nimble/controller/src/ble_ll_dtm.c
         nimble/controller/src/ble_ll_hci_ev.c
+        nimble/controller/src/ble_ll_iso.c
+        nimble/controller/src/ble_ll_rfmgmt.c
+        nimble/controller/src/ble_ll_scan_aux.c
+        nimble/controller/src/ble_ll_sync.c
+        nimble/controller/src/ble_ll_utils.c
         porting/nimble/src/os_cputime.c
         porting/nimble/src/os_cputime_pwr2.c
         porting/nimble/src/hal_timer.c

+ 9 - 0
porting/nimble/include/syscfg/syscfg.h

@@ -537,6 +537,15 @@
 #define MYNEWT_VAL_BLE_LL_RNG_BUFSIZE (32)
 #endif
 
+/* Value copied from BLE_LL_OUR_SCA */
+#ifndef MYNEWT_VAL_BLE_LL_SCA
+#define MYNEWT_VAL_BLE_LL_SCA (60)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_LL_SCAN_AUX_SEGMENT_CNT
+#define MYNEWT_VAL_BLE_LL_SCAN_AUX_SEGMENT_CNT (8)
+#endif
+
 #ifndef MYNEWT_VAL_BLE_LL_STRICT_CONN_SCHEDULING
 #define MYNEWT_VAL_BLE_LL_STRICT_CONN_SCHEDULING (0)
 #endif

+ 3 - 0
porting/npl/rtthread/include/config/config.h

@@ -9,6 +9,9 @@
 #define __NUMBLE_CONFIG_H__
 
 #include <rtconfig.h>
+#include "os/util.h"
+#include "console/console.h"
+
 
 /**
  * Bluetooth role support

+ 21 - 1
porting/npl/rtthread/include/console/console.h

@@ -12,6 +12,26 @@
 #include <rtthread.h>
 
 #define console_printf rt_kprintf
-#define MODLOG_DFLT(ml_lvl_, ...)
+
+/**
+ * XXX: Deprecated.  Use LOG_DFLT instead.
+ *
+ * @brief Writes a formatted text entry with the specified level to the
+ * default log module.
+ *
+ * The provided log level must be one of the following tokens:
+ *     o CRITICAL
+ *     o ERROR
+ *     o WARN
+ *     o INFO
+ *     o DEBUG
+ *
+ * This expands to nothing if the global log level is greater than
+ * the specified level.
+ *
+ * @param ml_lvl_               The log level of the entry to write.
+ */
+#define MODLOG_DFLT(ml_lvl_, ...) \
+    MODLOG(ml_lvl_, LOG_MODULE_DEFAULT, __VA_ARGS__)
 
 #endif

+ 7 - 0
porting/npl/rtthread/include/nimble/nimble_npl_os.h

@@ -67,4 +67,11 @@ static inline bool ble_npl_os_started(void)
     return 1;
 }
 
+static inline bool
+ble_npl_hw_is_in_critical(void)
+{
+    extern volatile uint8_t rt_interrupt_nest;
+    return rt_interrupt_nest ? true : false;
+}
+
 #endif  /* _NPL_H_ */