diff --git a/porting/examples/linux/include/logcfg/logcfg.h b/porting/examples/linux/include/logcfg/logcfg.h new file mode 100644 index 0000000000..ed5a61d5bc --- /dev/null +++ b/porting/examples/linux/include/logcfg/logcfg.h @@ -0,0 +1,32 @@ +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + +#ifndef H_MYNEWT_LOGCFG_ +#define H_MYNEWT_LOGCFG_ + +#include "modlog/modlog.h" +#include "log_common/log_common.h" + +#define BLE_EATT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_EATT_LOG_INFO(...) MODLOG_INFO(27, __VA_ARGS__) +#define BLE_EATT_LOG_WARN(...) MODLOG_WARN(27, __VA_ARGS__) +#define BLE_EATT_LOG_ERROR(...) MODLOG_ERROR(27, __VA_ARGS__) +#define BLE_EATT_LOG_CRITICAL(...) MODLOG_CRITICAL(27, __VA_ARGS__) +#define BLE_EATT_LOG_DISABLED(...) MODLOG_DISABLED(27, __VA_ARGS__) + +#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) +#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) +#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) +#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) +#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) + +#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) +#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) +#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) +#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) +#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) + +#endif diff --git a/porting/examples/linux/include/syscfg/syscfg.h b/porting/examples/linux/include/syscfg/syscfg.h index 04438c215c..5da33f2363 100644 --- a/porting/examples/linux/include/syscfg/syscfg.h +++ b/porting/examples/linux/include/syscfg/syscfg.h @@ -439,7 +439,7 @@ #endif #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif #ifndef MYNEWT_VAL_BLE_HCI_VS @@ -454,6 +454,10 @@ #define MYNEWT_VAL_BLE_ISO (0) #endif +#ifndef MYNEWT_VAL_BLE_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_ISO_TEST #define MYNEWT_VAL_BLE_ISO_TEST (0) #endif @@ -474,6 +478,10 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (0) #endif +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER #define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) #endif @@ -711,6 +719,10 @@ #define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) #endif +#ifndef MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT +#define MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT (0) +#endif + #ifndef MYNEWT_VAL_BLE_HS_LOG_LVL #define MYNEWT_VAL_BLE_HS_LOG_LVL (1) #endif @@ -771,6 +783,14 @@ #define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) #endif +#ifndef MYNEWT_VAL_BLE_MAX_BIG +#define MYNEWT_VAL_BLE_MAX_BIG (MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_BIS +#define MYNEWT_VAL_BLE_MAX_BIS (4) +#endif + #ifndef MYNEWT_VAL_BLE_MESH #define MYNEWT_VAL_BLE_MESH (0) #endif @@ -783,6 +803,10 @@ #define MYNEWT_VAL_BLE_SM_BONDING (0) #endif +#ifndef MYNEWT_VAL_BLE_SM_CSIS_SIRK +#define MYNEWT_VAL_BLE_SM_CSIS_SIRK (0) +#endif + #ifndef MYNEWT_VAL_BLE_SM_IO_CAP #define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) #endif @@ -1116,6 +1140,24 @@ #define MYNEWT_VAL_BLE_TRANSPORT_HS (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE (300) +#endif + /* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-nimble/nimble/transport) */ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 #define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) @@ -1138,6 +1180,9 @@ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket #define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll +#define MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll (0) +#endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL #define MYNEWT_VAL_BLE_TRANSPORT_LL (1) #endif diff --git a/porting/examples/linux/include/sysflash/sysflash.h b/porting/examples/linux/include/sysflash/sysflash.h index 8d358ac99a..78bec3d1a8 100644 --- a/porting/examples/linux/include/sysflash/sysflash.h +++ b/porting/examples/linux/include/sysflash/sysflash.h @@ -7,12 +7,16 @@ #include "flash_map/flash_map.h" +#define FLASH_AREA_COUNT 6 + /** * This flash map definition is used for two purposes: * 1. To locate the meta area, which contains the true flash map definition. * 2. As a fallback in case the meta area cannot be read from flash. */ -extern const struct flash_area sysflash_map_dflt[6]; +extern const struct flash_area sysflash_map_dflt[FLASH_AREA_COUNT]; + +/* Flash map was defined in @apache-mynewt-core/hw/bsp/native */ #define FLASH_AREA_BOOTLOADER 0 #define FLASH_AREA_BOOTLOADER_DEVICE 0 diff --git a/porting/examples/linux_blemesh/include/logcfg/logcfg.h b/porting/examples/linux_blemesh/include/logcfg/logcfg.h new file mode 100644 index 0000000000..ac07f39da3 --- /dev/null +++ b/porting/examples/linux_blemesh/include/logcfg/logcfg.h @@ -0,0 +1,158 @@ +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + +#ifndef H_MYNEWT_LOGCFG_ +#define H_MYNEWT_LOGCFG_ + +#include "modlog/modlog.h" +#include "log_common/log_common.h" + +#define BLE_EATT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_EATT_LOG_INFO(...) MODLOG_INFO(27, __VA_ARGS__) +#define BLE_EATT_LOG_WARN(...) MODLOG_WARN(27, __VA_ARGS__) +#define BLE_EATT_LOG_ERROR(...) MODLOG_ERROR(27, __VA_ARGS__) +#define BLE_EATT_LOG_CRITICAL(...) MODLOG_CRITICAL(27, __VA_ARGS__) +#define BLE_EATT_LOG_DISABLED(...) MODLOG_DISABLED(27, __VA_ARGS__) + +#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) +#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) +#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) +#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) +#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) + +#define BLE_MESH_ACCESS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_INFO(...) MODLOG_INFO(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_WARN(...) MODLOG_WARN(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_ERROR(...) MODLOG_ERROR(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_CRITICAL(...) MODLOG_CRITICAL(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_DISABLED(...) MODLOG_DISABLED(10, __VA_ARGS__) + +#define BLE_MESH_ADV_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_ADV_LOG_INFO(...) MODLOG_INFO(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_WARN(...) MODLOG_WARN(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_ERROR(...) MODLOG_ERROR(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_CRITICAL(...) MODLOG_CRITICAL(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_DISABLED(...) MODLOG_DISABLED(11, __VA_ARGS__) + +#define BLE_MESH_BEACON_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_BEACON_LOG_INFO(...) MODLOG_INFO(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_WARN(...) MODLOG_WARN(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_ERROR(...) MODLOG_ERROR(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_CRITICAL(...) MODLOG_CRITICAL(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_DISABLED(...) MODLOG_DISABLED(12, __VA_ARGS__) + +#define BLE_MESH_CRYPTO_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_INFO(...) MODLOG_INFO(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_WARN(...) MODLOG_WARN(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_ERROR(...) MODLOG_ERROR(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_CRITICAL(...) MODLOG_CRITICAL(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_DISABLED(...) MODLOG_DISABLED(13, __VA_ARGS__) + +#define BLE_MESH_FRIEND_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_INFO(...) MODLOG_INFO(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_WARN(...) MODLOG_WARN(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_ERROR(...) MODLOG_ERROR(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_CRITICAL(...) MODLOG_CRITICAL(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_DISABLED(...) MODLOG_DISABLED(14, __VA_ARGS__) + +#define BLE_MESH_HEARTBEAT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_HEARTBEAT_LOG_INFO(...) MODLOG_INFO(26, __VA_ARGS__) +#define BLE_MESH_HEARTBEAT_LOG_WARN(...) MODLOG_WARN(26, __VA_ARGS__) +#define BLE_MESH_HEARTBEAT_LOG_ERROR(...) MODLOG_ERROR(26, __VA_ARGS__) +#define BLE_MESH_HEARTBEAT_LOG_CRITICAL(...) MODLOG_CRITICAL(26, __VA_ARGS__) +#define BLE_MESH_HEARTBEAT_LOG_DISABLED(...) MODLOG_DISABLED(26, __VA_ARGS__) + +#define BLE_MESH_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_LOG_INFO(...) MODLOG_INFO(9, __VA_ARGS__) +#define BLE_MESH_LOG_WARN(...) MODLOG_WARN(9, __VA_ARGS__) +#define BLE_MESH_LOG_ERROR(...) MODLOG_ERROR(9, __VA_ARGS__) +#define BLE_MESH_LOG_CRITICAL(...) MODLOG_CRITICAL(9, __VA_ARGS__) +#define BLE_MESH_LOG_DISABLED(...) MODLOG_DISABLED(9, __VA_ARGS__) + +#define BLE_MESH_LOW_POWER_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_INFO(...) MODLOG_INFO(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_WARN(...) MODLOG_WARN(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_ERROR(...) MODLOG_ERROR(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_CRITICAL(...) MODLOG_CRITICAL(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_DISABLED(...) MODLOG_DISABLED(15, __VA_ARGS__) + +#define BLE_MESH_MODEL_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_MODEL_LOG_INFO(...) MODLOG_INFO(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_WARN(...) MODLOG_WARN(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_ERROR(...) MODLOG_ERROR(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_CRITICAL(...) MODLOG_CRITICAL(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_DISABLED(...) MODLOG_DISABLED(16, __VA_ARGS__) + +#define BLE_MESH_NET_KEYS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_NET_KEYS_LOG_INFO(...) MODLOG_INFO(23, __VA_ARGS__) +#define BLE_MESH_NET_KEYS_LOG_WARN(...) MODLOG_WARN(23, __VA_ARGS__) +#define BLE_MESH_NET_KEYS_LOG_ERROR(...) MODLOG_ERROR(23, __VA_ARGS__) +#define BLE_MESH_NET_KEYS_LOG_CRITICAL(...) MODLOG_CRITICAL(23, __VA_ARGS__) +#define BLE_MESH_NET_KEYS_LOG_DISABLED(...) MODLOG_DISABLED(23, __VA_ARGS__) + +#define BLE_MESH_NET_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_NET_LOG_INFO(...) MODLOG_INFO(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_WARN(...) MODLOG_WARN(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_ERROR(...) MODLOG_ERROR(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_CRITICAL(...) MODLOG_CRITICAL(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_DISABLED(...) MODLOG_DISABLED(17, __VA_ARGS__) + +#define BLE_MESH_PROVISIONER_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROVISIONER_LOG_INFO(...) MODLOG_INFO(25, __VA_ARGS__) +#define BLE_MESH_PROVISIONER_LOG_WARN(...) MODLOG_WARN(25, __VA_ARGS__) +#define BLE_MESH_PROVISIONER_LOG_ERROR(...) MODLOG_ERROR(25, __VA_ARGS__) +#define BLE_MESH_PROVISIONER_LOG_CRITICAL(...) MODLOG_CRITICAL(25, __VA_ARGS__) +#define BLE_MESH_PROVISIONER_LOG_DISABLED(...) MODLOG_DISABLED(25, __VA_ARGS__) + +#define BLE_MESH_PROV_DEVICE_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROV_DEVICE_LOG_INFO(...) MODLOG_INFO(24, __VA_ARGS__) +#define BLE_MESH_PROV_DEVICE_LOG_WARN(...) MODLOG_WARN(24, __VA_ARGS__) +#define BLE_MESH_PROV_DEVICE_LOG_ERROR(...) MODLOG_ERROR(24, __VA_ARGS__) +#define BLE_MESH_PROV_DEVICE_LOG_CRITICAL(...) MODLOG_CRITICAL(24, __VA_ARGS__) +#define BLE_MESH_PROV_DEVICE_LOG_DISABLED(...) MODLOG_DISABLED(24, __VA_ARGS__) + +#define BLE_MESH_PROV_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROV_LOG_INFO(...) MODLOG_INFO(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_WARN(...) MODLOG_WARN(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_ERROR(...) MODLOG_ERROR(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_CRITICAL(...) MODLOG_CRITICAL(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_DISABLED(...) MODLOG_DISABLED(18, __VA_ARGS__) + +#define BLE_MESH_PROXY_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROXY_LOG_INFO(...) MODLOG_INFO(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_WARN(...) MODLOG_WARN(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_ERROR(...) MODLOG_ERROR(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_CRITICAL(...) MODLOG_CRITICAL(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_DISABLED(...) MODLOG_DISABLED(19, __VA_ARGS__) + +#define BLE_MESH_RPL_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_RPL_LOG_INFO(...) MODLOG_INFO(22, __VA_ARGS__) +#define BLE_MESH_RPL_LOG_WARN(...) MODLOG_WARN(22, __VA_ARGS__) +#define BLE_MESH_RPL_LOG_ERROR(...) MODLOG_ERROR(22, __VA_ARGS__) +#define BLE_MESH_RPL_LOG_CRITICAL(...) MODLOG_CRITICAL(22, __VA_ARGS__) +#define BLE_MESH_RPL_LOG_DISABLED(...) MODLOG_DISABLED(22, __VA_ARGS__) + +#define BLE_MESH_SETTINGS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_INFO(...) MODLOG_INFO(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_WARN(...) MODLOG_WARN(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_ERROR(...) MODLOG_ERROR(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_CRITICAL(...) MODLOG_CRITICAL(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_DISABLED(...) MODLOG_DISABLED(20, __VA_ARGS__) + +#define BLE_MESH_TRANS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_TRANS_LOG_INFO(...) MODLOG_INFO(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_WARN(...) MODLOG_WARN(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_ERROR(...) MODLOG_ERROR(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_CRITICAL(...) MODLOG_CRITICAL(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_DISABLED(...) MODLOG_DISABLED(21, __VA_ARGS__) + +#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) +#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) +#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) +#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) +#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) + +#endif diff --git a/porting/examples/linux_blemesh/include/syscfg/syscfg.h b/porting/examples/linux_blemesh/include/syscfg/syscfg.h index c9fd541127..411ddbb94d 100644 --- a/porting/examples/linux_blemesh/include/syscfg/syscfg.h +++ b/porting/examples/linux_blemesh/include/syscfg/syscfg.h @@ -440,7 +440,7 @@ #endif #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif #ifndef MYNEWT_VAL_BLE_HCI_VS @@ -455,6 +455,10 @@ #define MYNEWT_VAL_BLE_ISO (0) #endif +#ifndef MYNEWT_VAL_BLE_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_ISO_TEST #define MYNEWT_VAL_BLE_ISO_TEST (0) #endif @@ -475,6 +479,10 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (0) #endif +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER #define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) #endif @@ -712,6 +720,10 @@ #define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) #endif +#ifndef MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT +#define MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT (0) +#endif + #ifndef MYNEWT_VAL_BLE_HS_LOG_LVL #define MYNEWT_VAL_BLE_HS_LOG_LVL (1) #endif @@ -772,6 +784,14 @@ #define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) #endif +#ifndef MYNEWT_VAL_BLE_MAX_BIG +#define MYNEWT_VAL_BLE_MAX_BIG (MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_BIS +#define MYNEWT_VAL_BLE_MAX_BIS (4) +#endif + /* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host) */ #ifndef MYNEWT_VAL_BLE_MESH #define MYNEWT_VAL_BLE_MESH (1) @@ -785,6 +805,10 @@ #define MYNEWT_VAL_BLE_SM_BONDING (0) #endif +#ifndef MYNEWT_VAL_BLE_SM_CSIS_SIRK +#define MYNEWT_VAL_BLE_SM_CSIS_SIRK (0) +#endif + #ifndef MYNEWT_VAL_BLE_SM_IO_CAP #define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) #endif @@ -1691,6 +1715,24 @@ #define MYNEWT_VAL_BLE_TRANSPORT_HS (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE (300) +#endif + /* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport) */ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 #define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) @@ -1713,6 +1755,9 @@ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket #define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll +#define MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll (0) +#endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL #define MYNEWT_VAL_BLE_TRANSPORT_LL (1) #endif diff --git a/porting/examples/linux_blemesh/include/sysflash/sysflash.h b/porting/examples/linux_blemesh/include/sysflash/sysflash.h index 8d358ac99a..78bec3d1a8 100644 --- a/porting/examples/linux_blemesh/include/sysflash/sysflash.h +++ b/porting/examples/linux_blemesh/include/sysflash/sysflash.h @@ -7,12 +7,16 @@ #include "flash_map/flash_map.h" +#define FLASH_AREA_COUNT 6 + /** * This flash map definition is used for two purposes: * 1. To locate the meta area, which contains the true flash map definition. * 2. As a fallback in case the meta area cannot be read from flash. */ -extern const struct flash_area sysflash_map_dflt[6]; +extern const struct flash_area sysflash_map_dflt[FLASH_AREA_COUNT]; + +/* Flash map was defined in @apache-mynewt-core/hw/bsp/native */ #define FLASH_AREA_BOOTLOADER 0 #define FLASH_AREA_BOOTLOADER_DEVICE 0 diff --git a/porting/examples/nuttx/include/logcfg/logcfg.h b/porting/examples/nuttx/include/logcfg/logcfg.h new file mode 100644 index 0000000000..ed5a61d5bc --- /dev/null +++ b/porting/examples/nuttx/include/logcfg/logcfg.h @@ -0,0 +1,32 @@ +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + +#ifndef H_MYNEWT_LOGCFG_ +#define H_MYNEWT_LOGCFG_ + +#include "modlog/modlog.h" +#include "log_common/log_common.h" + +#define BLE_EATT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_EATT_LOG_INFO(...) MODLOG_INFO(27, __VA_ARGS__) +#define BLE_EATT_LOG_WARN(...) MODLOG_WARN(27, __VA_ARGS__) +#define BLE_EATT_LOG_ERROR(...) MODLOG_ERROR(27, __VA_ARGS__) +#define BLE_EATT_LOG_CRITICAL(...) MODLOG_CRITICAL(27, __VA_ARGS__) +#define BLE_EATT_LOG_DISABLED(...) MODLOG_DISABLED(27, __VA_ARGS__) + +#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) +#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) +#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) +#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) +#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) + +#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) +#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) +#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) +#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) +#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) + +#endif diff --git a/porting/examples/nuttx/include/syscfg/syscfg.h b/porting/examples/nuttx/include/syscfg/syscfg.h index 6035f7966e..3dda2934a9 100644 --- a/porting/examples/nuttx/include/syscfg/syscfg.h +++ b/porting/examples/nuttx/include/syscfg/syscfg.h @@ -439,7 +439,7 @@ #endif #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif #ifndef MYNEWT_VAL_BLE_HCI_VS @@ -454,6 +454,10 @@ #define MYNEWT_VAL_BLE_ISO (0) #endif +#ifndef MYNEWT_VAL_BLE_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_ISO_TEST #define MYNEWT_VAL_BLE_ISO_TEST (0) #endif @@ -474,6 +478,10 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (0) #endif +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER #define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) #endif @@ -531,6 +539,10 @@ #define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY (1) #endif +#ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI +#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) +#endif + #ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE #define MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE (1) #endif @@ -571,6 +583,22 @@ #define MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP (1) #endif +#ifndef MYNEWT_VAL_BLE_EATT_CHAN_NUM +#define MYNEWT_VAL_BLE_EATT_CHAN_NUM (0) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_LOG_LVL +#define MYNEWT_VAL_BLE_EATT_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_LOG_MOD +#define MYNEWT_VAL_BLE_EATT_LOG_MOD (27) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_MTU +#define MYNEWT_VAL_BLE_EATT_MTU (128) +#endif + #ifndef MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE #define MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE (1) #endif @@ -627,6 +655,10 @@ #define MYNEWT_VAL_BLE_GATT_READ_MULT (MYNEWT_VAL_BLE_ROLE_CENTRAL) #endif +#ifndef MYNEWT_VAL_BLE_GATT_READ_MULT_VAR +#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR (MYNEWT_VAL_BLE_ROLE_CENTRAL && (MYNEWT_VAL_BLE_VERSION >= 52)) +#endif + #ifndef MYNEWT_VAL_BLE_GATT_READ_UUID #define MYNEWT_VAL_BLE_GATT_READ_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL) #endif @@ -687,6 +719,10 @@ #define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) #endif +#ifndef MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT +#define MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT (0) +#endif + #ifndef MYNEWT_VAL_BLE_HS_LOG_LVL #define MYNEWT_VAL_BLE_HS_LOG_LVL (1) #endif @@ -747,6 +783,14 @@ #define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) #endif +#ifndef MYNEWT_VAL_BLE_MAX_BIG +#define MYNEWT_VAL_BLE_MAX_BIG (MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_BIS +#define MYNEWT_VAL_BLE_MAX_BIS (4) +#endif + #ifndef MYNEWT_VAL_BLE_MESH #define MYNEWT_VAL_BLE_MESH (0) #endif @@ -759,6 +803,10 @@ #define MYNEWT_VAL_BLE_SM_BONDING (0) #endif +#ifndef MYNEWT_VAL_BLE_SM_CSIS_SIRK +#define MYNEWT_VAL_BLE_SM_CSIS_SIRK (0) +#endif + #ifndef MYNEWT_VAL_BLE_SM_IO_CAP #define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) #endif @@ -1094,6 +1142,24 @@ #define MYNEWT_VAL_BLE_TRANSPORT_HS (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE (300) +#endif + /* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport) */ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 #define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) @@ -1116,6 +1182,9 @@ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket #define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll +#define MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll (0) +#endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL #define MYNEWT_VAL_BLE_TRANSPORT_LL (1) #endif diff --git a/porting/examples/nuttx/include/sysflash/sysflash.h b/porting/examples/nuttx/include/sysflash/sysflash.h index 8d358ac99a..78bec3d1a8 100644 --- a/porting/examples/nuttx/include/sysflash/sysflash.h +++ b/porting/examples/nuttx/include/sysflash/sysflash.h @@ -7,12 +7,16 @@ #include "flash_map/flash_map.h" +#define FLASH_AREA_COUNT 6 + /** * This flash map definition is used for two purposes: * 1. To locate the meta area, which contains the true flash map definition. * 2. As a fallback in case the meta area cannot be read from flash. */ -extern const struct flash_area sysflash_map_dflt[6]; +extern const struct flash_area sysflash_map_dflt[FLASH_AREA_COUNT]; + +/* Flash map was defined in @apache-mynewt-core/hw/bsp/native */ #define FLASH_AREA_BOOTLOADER 0 #define FLASH_AREA_BOOTLOADER_DEVICE 0 diff --git a/porting/nimble/include/logcfg/logcfg.h b/porting/nimble/include/logcfg/logcfg.h new file mode 100644 index 0000000000..ed5a61d5bc --- /dev/null +++ b/porting/nimble/include/logcfg/logcfg.h @@ -0,0 +1,32 @@ +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + +#ifndef H_MYNEWT_LOGCFG_ +#define H_MYNEWT_LOGCFG_ + +#include "modlog/modlog.h" +#include "log_common/log_common.h" + +#define BLE_EATT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_EATT_LOG_INFO(...) MODLOG_INFO(27, __VA_ARGS__) +#define BLE_EATT_LOG_WARN(...) MODLOG_WARN(27, __VA_ARGS__) +#define BLE_EATT_LOG_ERROR(...) MODLOG_ERROR(27, __VA_ARGS__) +#define BLE_EATT_LOG_CRITICAL(...) MODLOG_CRITICAL(27, __VA_ARGS__) +#define BLE_EATT_LOG_DISABLED(...) MODLOG_DISABLED(27, __VA_ARGS__) + +#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) +#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) +#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) +#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) +#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) + +#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) +#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) +#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) +#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) +#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) + +#endif diff --git a/porting/nimble/include/syscfg/syscfg.h b/porting/nimble/include/syscfg/syscfg.h index dcea02fd60..4b9cf21af8 100644 --- a/porting/nimble/include/syscfg/syscfg.h +++ b/porting/nimble/include/syscfg/syscfg.h @@ -438,7 +438,7 @@ #endif #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif #ifndef MYNEWT_VAL_BLE_HCI_VS @@ -453,6 +453,10 @@ #define MYNEWT_VAL_BLE_ISO (0) #endif +#ifndef MYNEWT_VAL_BLE_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_ISO_TEST #define MYNEWT_VAL_BLE_ISO_TEST (0) #endif @@ -473,6 +477,10 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (0) #endif +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER #define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) #endif @@ -710,6 +718,10 @@ #define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) #endif +#ifndef MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT +#define MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT (0) +#endif + #ifndef MYNEWT_VAL_BLE_HS_LOG_LVL #define MYNEWT_VAL_BLE_HS_LOG_LVL (1) #endif @@ -770,6 +782,14 @@ #define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) #endif +#ifndef MYNEWT_VAL_BLE_MAX_BIG +#define MYNEWT_VAL_BLE_MAX_BIG (MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_BIS +#define MYNEWT_VAL_BLE_MAX_BIS (4) +#endif + #ifndef MYNEWT_VAL_BLE_MESH #define MYNEWT_VAL_BLE_MESH (0) #endif @@ -782,6 +802,10 @@ #define MYNEWT_VAL_BLE_SM_BONDING (0) #endif +#ifndef MYNEWT_VAL_BLE_SM_CSIS_SIRK +#define MYNEWT_VAL_BLE_SM_CSIS_SIRK (0) +#endif + #ifndef MYNEWT_VAL_BLE_SM_IO_CAP #define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) #endif @@ -1115,6 +1139,24 @@ #define MYNEWT_VAL_BLE_TRANSPORT_HS (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE (300) +#endif + /* Overridden by @apache-mynewt-nimble/porting/targets/porting_default (defined by @apache-mynewt-nimble/nimble/transport) */ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 #define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) @@ -1137,6 +1179,9 @@ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket #define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll +#define MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll (0) +#endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL #define MYNEWT_VAL_BLE_TRANSPORT_LL (1) #endif diff --git a/porting/nimble/include/sysflash/sysflash.h b/porting/nimble/include/sysflash/sysflash.h index 8d358ac99a..78bec3d1a8 100644 --- a/porting/nimble/include/sysflash/sysflash.h +++ b/porting/nimble/include/sysflash/sysflash.h @@ -7,12 +7,16 @@ #include "flash_map/flash_map.h" +#define FLASH_AREA_COUNT 6 + /** * This flash map definition is used for two purposes: * 1. To locate the meta area, which contains the true flash map definition. * 2. As a fallback in case the meta area cannot be read from flash. */ -extern const struct flash_area sysflash_map_dflt[6]; +extern const struct flash_area sysflash_map_dflt[FLASH_AREA_COUNT]; + +/* Flash map was defined in @apache-mynewt-core/hw/bsp/native */ #define FLASH_AREA_BOOTLOADER 0 #define FLASH_AREA_BOOTLOADER_DEVICE 0 diff --git a/porting/npl/riot/include/logcfg/logcfg.h b/porting/npl/riot/include/logcfg/logcfg.h new file mode 100644 index 0000000000..ed5a61d5bc --- /dev/null +++ b/porting/npl/riot/include/logcfg/logcfg.h @@ -0,0 +1,32 @@ +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + +#ifndef H_MYNEWT_LOGCFG_ +#define H_MYNEWT_LOGCFG_ + +#include "modlog/modlog.h" +#include "log_common/log_common.h" + +#define BLE_EATT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_EATT_LOG_INFO(...) MODLOG_INFO(27, __VA_ARGS__) +#define BLE_EATT_LOG_WARN(...) MODLOG_WARN(27, __VA_ARGS__) +#define BLE_EATT_LOG_ERROR(...) MODLOG_ERROR(27, __VA_ARGS__) +#define BLE_EATT_LOG_CRITICAL(...) MODLOG_CRITICAL(27, __VA_ARGS__) +#define BLE_EATT_LOG_DISABLED(...) MODLOG_DISABLED(27, __VA_ARGS__) + +#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) +#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) +#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) +#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) +#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) + +#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) +#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) +#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) +#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) +#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) + +#endif diff --git a/porting/npl/riot/include/syscfg/syscfg.h b/porting/npl/riot/include/syscfg/syscfg.h index b381d3289c..0bbde35d3c 100644 --- a/porting/npl/riot/include/syscfg/syscfg.h +++ b/porting/npl/riot/include/syscfg/syscfg.h @@ -117,6 +117,20 @@ #undef MYNEWT_VAL_I2C_1_PIN_SDA +/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ +#ifndef MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__default +#define MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__default (0) +#endif +#ifndef MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__disable +#define MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__disable (1) +#endif +#ifndef MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__enable +#define MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION__enable (0) +#endif +#ifndef MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION +#define MYNEWT_VAL_MCU_ACCESS_PORT_PROTECTION (1) +#endif + #ifndef MYNEWT_VAL_MCU_BUS_DRIVER_I2C_USE_TWIM #define MYNEWT_VAL_MCU_BUS_DRIVER_I2C_USE_TWIM (0) #endif @@ -303,17 +317,17 @@ /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_MISO -#define MYNEWT_VAL_SPI_0_MASTER_PIN_MISO (47) +#define MYNEWT_VAL_SPI_0_MASTER_PIN_MISO (46) #endif /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_MOSI -#define MYNEWT_VAL_SPI_0_MASTER_PIN_MOSI (46) +#define MYNEWT_VAL_SPI_0_MASTER_PIN_MOSI (45) #endif /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_MASTER_PIN_SCK -#define MYNEWT_VAL_SPI_0_MASTER_PIN_SCK (45) +#define MYNEWT_VAL_SPI_0_MASTER_PIN_SCK (47) #endif #ifndef MYNEWT_VAL_SPI_0_SLAVE @@ -322,17 +336,17 @@ /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_MISO -#define MYNEWT_VAL_SPI_0_SLAVE_PIN_MISO (47) +#define MYNEWT_VAL_SPI_0_SLAVE_PIN_MISO (46) #endif /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_MOSI -#define MYNEWT_VAL_SPI_0_SLAVE_PIN_MOSI (46) +#define MYNEWT_VAL_SPI_0_SLAVE_PIN_MOSI (45) #endif /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ #ifndef MYNEWT_VAL_SPI_0_SLAVE_PIN_SCK -#define MYNEWT_VAL_SPI_0_SLAVE_PIN_SCK (45) +#define MYNEWT_VAL_SPI_0_SLAVE_PIN_SCK (47) #endif /* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */ @@ -670,6 +684,17 @@ #define MYNEWT_VAL_WATCHDOG_INTERVAL (30000) #endif +/*** @apache-mynewt-core/libc */ +#ifndef MYNEWT_VAL_LIBC__baselibc +#define MYNEWT_VAL_LIBC__baselibc (1) +#endif +#ifndef MYNEWT_VAL_LIBC__nano +#define MYNEWT_VAL_LIBC__nano (0) +#endif +#ifndef MYNEWT_VAL_LIBC +#define MYNEWT_VAL_LIBC (1) +#endif + /*** @apache-mynewt-core/libc/baselibc */ #ifndef MYNEWT_VAL_BASELIBC_ASSERT_FILE_LINE #define MYNEWT_VAL_BASELIBC_ASSERT_FILE_LINE (0) @@ -814,7 +839,7 @@ #endif #ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif /* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble) */ @@ -830,6 +855,10 @@ #define MYNEWT_VAL_BLE_ISO (0) #endif +#ifndef MYNEWT_VAL_BLE_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_ISO_TEST #define MYNEWT_VAL_BLE_ISO_TEST (0) #endif @@ -851,6 +880,10 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (0) #endif +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER #define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) #endif @@ -995,16 +1028,6 @@ #define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_EXT_ADV (0) #endif -/* Value copied from BLE_ISO */ -#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO (0) -#endif - -/* Value copied from BLE_ISO_TEST */ -#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST (0) -#endif - /* Value copied from BLE_PERIODIC_ADV */ #ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV #define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV (0) @@ -1154,6 +1177,16 @@ #define MYNEWT_VAL_BLE_LL_HCI_VS_EVENT_ON_ASSERT (0) #endif +/* Value copied from BLE_ISO */ +#ifndef MYNEWT_VAL_BLE_LL_ISO +#define MYNEWT_VAL_BLE_LL_ISO (0) +#endif + +/* Value copied from BLE_ISO_BROADCASTER */ +#ifndef MYNEWT_VAL_BLE_LL_ISO_BROADCASTER +#define MYNEWT_VAL_BLE_LL_ISO_BROADCASTER (0) +#endif + #ifndef MYNEWT_VAL_BLE_LL_LNA #define MYNEWT_VAL_BLE_LL_LNA (0) #endif @@ -1211,6 +1244,11 @@ #define MYNEWT_VAL_BLE_LL_PA_TURN_ON_US (1) #endif +/* Value copied from BLE_PERIODIC_ADV_SYNC_BIGINFO_REPORTS */ +#ifndef MYNEWT_VAL_BLE_LL_PERIODIC_ADV_SYNC_BIGINFO_REPORTS +#define MYNEWT_VAL_BLE_LL_PERIODIC_ADV_SYNC_BIGINFO_REPORTS (0) +#endif + #ifndef MYNEWT_VAL_BLE_LL_PRIO #define MYNEWT_VAL_BLE_LL_PRIO (0) #endif @@ -1353,10 +1391,18 @@ #define MYNEWT_VAL_BLE_PHY_DBG_TIME_WFR_PIN (-1) #endif +#ifndef MYNEWT_VAL_BLE_PHY_EXTENDED_TIFS +#define MYNEWT_VAL_BLE_PHY_EXTENDED_TIFS (2) +#endif + #ifndef MYNEWT_VAL_BLE_PHY_NRF52_HEADERMASK_WORKAROUND #define MYNEWT_VAL_BLE_PHY_NRF52_HEADERMASK_WORKAROUND (0) #endif +#ifndef MYNEWT_VAL_BLE_PHY_NRF5340_VDDH +#define MYNEWT_VAL_BLE_PHY_NRF5340_VDDH (0) +#endif + #ifndef MYNEWT_VAL_BLE_PHY_SYSVIEW #define MYNEWT_VAL_BLE_PHY_SYSVIEW (0) #endif @@ -1574,6 +1620,10 @@ #define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) #endif +#ifndef MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT +#define MYNEWT_VAL_BLE_HS_GAP_UNHANDLED_HCI_EVENT (0) +#endif + #ifndef MYNEWT_VAL_BLE_HS_LOG_LVL #define MYNEWT_VAL_BLE_HS_LOG_LVL (1) #endif @@ -1634,6 +1684,14 @@ #define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) #endif +#ifndef MYNEWT_VAL_BLE_MAX_BIG +#define MYNEWT_VAL_BLE_MAX_BIG (MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_BIS +#define MYNEWT_VAL_BLE_MAX_BIS (4) +#endif + #ifndef MYNEWT_VAL_BLE_MESH #define MYNEWT_VAL_BLE_MESH (0) #endif @@ -1646,6 +1704,10 @@ #define MYNEWT_VAL_BLE_SM_BONDING (0) #endif +#ifndef MYNEWT_VAL_BLE_SM_CSIS_SIRK +#define MYNEWT_VAL_BLE_SM_CSIS_SIRK (0) +#endif + #ifndef MYNEWT_VAL_BLE_SM_IO_CAP #define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) #endif @@ -1866,6 +1928,24 @@ #define MYNEWT_VAL_BLE_TRANSPORT_HS (1) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ISO_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ISO_SIZE (300) +#endif + #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 #define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) #endif @@ -1887,6 +1967,9 @@ #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket #define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (0) #endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll +#define MYNEWT_VAL_BLE_TRANSPORT_LL__uart_ll (0) +#endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_LL #define MYNEWT_VAL_BLE_TRANSPORT_LL (1) #endif @@ -1943,6 +2026,7 @@ #define MYNEWT_PKG_apache_mynewt_core__hw_mcu_nordic 1 #define MYNEWT_PKG_apache_mynewt_core__hw_mcu_nordic_nrf52xxx 1 #define MYNEWT_PKG_apache_mynewt_core__kernel_os 1 +#define MYNEWT_PKG_apache_mynewt_core__libc 1 #define MYNEWT_PKG_apache_mynewt_core__libc_baselibc 1 #define MYNEWT_PKG_apache_mynewt_core__sys_console_stub 1 #define MYNEWT_PKG_apache_mynewt_core__sys_defs 1 diff --git a/porting/npl/riot/include/sysflash/sysflash.h b/porting/npl/riot/include/sysflash/sysflash.h index 05324aaabc..d554882e0b 100644 --- a/porting/npl/riot/include/sysflash/sysflash.h +++ b/porting/npl/riot/include/sysflash/sysflash.h @@ -7,12 +7,16 @@ #include "flash_map/flash_map.h" +#define FLASH_AREA_COUNT 6 + /** * This flash map definition is used for two purposes: * 1. To locate the meta area, which contains the true flash map definition. * 2. As a fallback in case the meta area cannot be read from flash. */ -extern const struct flash_area sysflash_map_dflt[6]; +extern const struct flash_area sysflash_map_dflt[FLASH_AREA_COUNT]; + +/* Flash map was defined in @apache-mynewt-core/hw/bsp/nordic_pca10056 */ #define FLASH_AREA_BOOTLOADER 0 #define FLASH_AREA_BOOTLOADER_DEVICE 0