summaryrefslogtreecommitdiff
path: root/src/libs/mynewt-nimble
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/mynewt-nimble')
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c5
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h2
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h3
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h14
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c2
5 files changed, 6 insertions, 20 deletions
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c b/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c
index aa25096b..2f6ce08e 100644
--- a/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c
@@ -37,7 +37,6 @@
#else
#include "core_cm4.h"
#endif
-#include <legacy/nrf_drv_clock.h>
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
#if !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52840) && !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52811)
@@ -2102,7 +2101,7 @@ ble_phy_rfclk_enable(void)
#if MYNEWT
nrf52_clock_hfxo_request();
#else
- nrf_drv_clock_hfclk_request(NULL);
+ NRF_CLOCK->TASKS_HFCLKSTART = 1;
#endif
}
@@ -2112,6 +2111,6 @@ ble_phy_rfclk_disable(void)
#if MYNEWT
nrf52_clock_hfxo_release();
#else
- nrf_drv_clock_hfclk_release();
+ NRF_CLOCK->TASKS_HFCLKSTOP = 1;
#endif
}
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
index 556635ca..837cdeac 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
@@ -8,7 +8,7 @@
#include "modlog/modlog.h"
#include "log_common/log_common.h"
-#define BLE_HS_LOG_DEBUG(...) MODLOG_DEBUG(4, __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__)
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h b/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
index 5b0ef45c..03904610 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
@@ -20,8 +20,7 @@
#ifndef H_MODLOG_
#define H_MODLOG_
-#include "SEGGER_RTT.h"
-#define printf(...) SEGGER_RTT_printf(0, __VA_ARGS__)
+#include <stdio.h>
#include "log_common/log_common.h"
#include "log/log.h"
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
index 3a3de40d..545be0f4 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
@@ -37,8 +37,6 @@ extern "C" {
#define BLE_NPL_TIME_FOREVER portMAX_DELAY
-extern volatile int ble_npl_in_critical;
-
/* This should be compatible with TickType_t */
typedef uint32_t ble_npl_time_t;
typedef int32_t ble_npl_stime_t;
@@ -284,22 +282,14 @@ static inline uint32_t
ble_npl_hw_enter_critical(void)
{
//vPortEnterCritical();
- ++ble_npl_in_critical;
- return npl_freertos_hw_enter_critical();
+ return npl_freertos_hw_enter_critical();
}
static inline void
ble_npl_hw_exit_critical(uint32_t ctx)
{
- --ble_npl_in_critical;
- npl_freertos_hw_exit_critical(ctx);
-}
+ npl_freertos_hw_exit_critical(ctx);
-static inline bool
-ble_npl_hw_is_in_critical(void)
-{
- // Do the same as RIOT and keep track of the critical state manually
- return (ble_npl_in_critical > 0);
}
#ifdef __cplusplus
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
index 667a751c..875521ab 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
@@ -22,8 +22,6 @@
#include <string.h>
#include "nimble/nimble_npl.h"
-volatile int ble_npl_in_critical = 0;
-
static inline bool
in_isr(void)
{