You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2025/09/01 08:38:52 UTC
(mynewt-nimble) branch master updated (b0f06d8da -> b6831813c)
This is an automated email from the ASF dual-hosted git repository.
janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
from b0f06d8da nimble/phy/cmac: Remove redundant assert
new 3f9d551d1 nuttx/nimble_npl_os_log.h: fix log level config from Kconfig
new 4c9630f53 transport/ble_hci_socket.c: fix implicit declaration error
new b6831813c transport/rx_task.c: fix defined but not used warning
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
nimble/transport/socket/src/ble_hci_socket.c | 2 +
nimble/transport/src/rx_task.c | 2 +
.../npl/nuttx/include/nimble/nimble_npl_os_log.h | 53 ++++++++++++++++------
3 files changed, 44 insertions(+), 13 deletions(-)
(mynewt-nimble) 01/03: nuttx/nimble_npl_os_log.h: fix log level config from Kconfig
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 3f9d551d1cdda534cf6982a847a44dd079547c3a
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Aug 23 10:41:03 2025 +0200
nuttx/nimble_npl_os_log.h: fix log level config from Kconfig
The log messages control was broken since:
da4e2f0f12859079f1bde47cbd69f39026c3cc73.
All log messages were printed. With this change we can configure the log
level from Kconfig again.
Signed-off-by: raiden00pl <ra...@railab.me>
---
.../npl/nuttx/include/nimble/nimble_npl_os_log.h | 53 ++++++++++++++++------
1 file changed, 40 insertions(+), 13 deletions(-)
diff --git a/porting/npl/nuttx/include/nimble/nimble_npl_os_log.h b/porting/npl/nuttx/include/nimble/nimble_npl_os_log.h
index 24315a21a..01220b805 100644
--- a/porting/npl/nuttx/include/nimble/nimble_npl_os_log.h
+++ b/porting/npl/nuttx/include/nimble/nimble_npl_os_log.h
@@ -20,18 +20,45 @@
#ifndef _NIMBLE_NPL_OS_LOG_H_
#define _NIMBLE_NPL_OS_LOG_H_
-#include <stdarg.h>
-#include <stdio.h>
-
-/* Example on how to use macro to generate module logging functions */
-#define BLE_NPL_LOG_IMPL(lvl) \
- static inline void _BLE_NPL_LOG_CAT(BLE_NPL_LOG_MODULE, \
- _BLE_NPL_LOG_CAT(_, lvl))(const char *fmt, ...)\
- { \
- va_list args; \
- va_start(args, fmt); \
- vprintf(fmt, args); \
- va_end(args); \
- }
+#include <nuttx/config.h>
+#include <debug.h>
+
+/* Debug log level configurable from Kconfig */
+
+#ifdef CONFIG_NIMBLE_DEBUG_ERROR
+#define nimble_err _err
+#else
+#define nimble_err _none
+#endif
+
+#ifdef CONFIG_NIMBLE_DEBUG_WARN
+#define nimble_warn _warn
+#else
+#define nimble_warn _none
+#endif
+
+#ifdef CONFIG_NIMBLE_DEBUG_INFO
+#define nimble_info _info
+#else
+#define nimble_info _none
+#endif
+
+#define DFLT_LOG_DEBUG(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define DFLT_LOG_INFO(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define DFLT_LOG_WARN(msg, ...) nimble_warn(msg, ##__VA_ARGS__)
+#define DFLT_LOG_ERROR(msg, ...) nimble_err(msg, ##__VA_ARGS__)
+#define DFLT_LOG_CRITICAL(msg, ...) nimble_err(msg, ##__VA_ARGS__)
+
+#define BLE_HS_LOG_DEBUG(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define BLE_HS_LOG_INFO(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define BLE_HS_LOG_WARN(msg, ...) nimble_warn(msg, ##__VA_ARGS__)
+#define BLE_HS_LOG_ERROR(msg, ...) nimble_err(msg, ##__VA_ARGS__)
+#define BLE_HS_LOG_CRITICAL(msg, ...) nimble_err(msg, ##__VA_ARGS__)
+
+#define BLE_EATT_LOG_DEBUG(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define BLE_EATT_LOG_INFO(msg, ...) nimble_info(msg, ##__VA_ARGS__)
+#define BLE_EATT_LOG_WARN(msg, ...) nimble_warn(msg, ##__VA_ARGS__)
+#define BLE_EATT_LOG_ERROR(msg, ...) nimble_err(msg, ##__VA_ARGS__)
+#define BLE_EATT_LOG_CRITICAL(msg, ...) nimble_err(msg, ##__VA_ARGS__)
#endif /* _NIMBLE_NPL_OS_LOG_H_ */
(mynewt-nimble) 03/03: transport/rx_task.c: fix defined but not used warning
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit b6831813cfe6da9b25c8be7136b40ce060bf9710
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Aug 23 12:59:11 2025 +0200
transport/rx_task.c: fix defined but not used warning
fix warning on NuttX:
mynewt-nimble/nimble/transport/src/rx_task.c:49:1:
warning: 'rx_task_func' defined but not used [-Wunused-function]
Signed-off-by: raiden00pl <ra...@railab.me>
---
nimble/transport/src/rx_task.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nimble/transport/src/rx_task.c b/nimble/transport/src/rx_task.c
index 4e7d7196a..957ab7907 100644
--- a/nimble/transport/src/rx_task.c
+++ b/nimble/transport/src/rx_task.c
@@ -45,6 +45,7 @@ rx_event_func(struct ble_npl_event *ev)
rx_func(rx_func_arg);
}
+#ifdef MYNEWT
static void
rx_task_func(void *arg)
{
@@ -57,6 +58,7 @@ rx_task_func(void *arg)
ble_npl_event_run(ev);
}
}
+#endif
void
ble_transport_rx_register(ble_transport_rx_func_t *func, void *arg)
(mynewt-nimble) 02/03: transport/ble_hci_socket.c: fix implicit declaration error
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 4c9630f537fedd861fec0e1ca547b9b8ae44fd61
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Aug 23 11:11:33 2025 +0200
transport/ble_hci_socket.c: fix implicit declaration error
fix NuttX compilation error with GCC14:
mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c:921:12:
error: implicit declaration of function 'ble_hci_sock_iso_tx';
Signed-off-by: raiden00pl <ra...@railab.me>
---
nimble/transport/socket/src/ble_hci_socket.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nimble/transport/socket/src/ble_hci_socket.c b/nimble/transport/socket/src/ble_hci_socket.c
index c0581c635..d76c4dfa5 100644
--- a/nimble/transport/socket/src/ble_hci_socket.c
+++ b/nimble/transport/socket/src/ble_hci_socket.c
@@ -915,11 +915,13 @@ ble_hci_sock_init(void)
SYSINIT_PANIC_ASSERT(rc == 0);
}
+#if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE) || MYNEWT_VAL(BLE_SOCK_USE_TCP)
int
ble_transport_to_ll_iso_impl(struct os_mbuf *om)
{
return ble_hci_sock_iso_tx(om);
}
+#endif
void
ble_transport_ll_init(void)