Browse Source

update

master
zhaohe 1 year ago
parent
commit
1d9ac0bb2d
  1. 6
      include/znordic.h
  2. 2
      src/zble_module.c

6
include/znordic.h

@ -73,7 +73,7 @@ void nrf_log_backend_uart_tx_raw(char const* p_buffer, size_t len);
*******************************************************************************/
#define ZLOGI(...) NRF_LOG_INFO(__VA_ARGS__)
#define ZLOGE(...) NRF_LOG_ERROR(__VA_ARGS__)
#define ZLOGE(...) ZLOGE_BLOCK(__VA_ARGS__)
#define ZLOGW(...) NRF_LOG_WARNING(__VA_ARGS__)
#define ZLOGD(...) NRF_LOG_DEBUG(__VA_ARGS__)
@ -109,7 +109,7 @@ void nrf_log_backend_uart_tx_raw(char const* p_buffer, size_t len);
do { \
const uint32_t _zecode = (err_code); \
if (_zecode != NRF_SUCCESS) { \
ZLOGI("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, _zecode); \
ZLOGE_BLOCK("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, _zecode); \
APP_ERROR_CHECK(_zecode); \
} \
} while (0)
@ -117,7 +117,7 @@ void nrf_log_backend_uart_tx_raw(char const* p_buffer, size_t len);
#define ZASSERT(expr) \
do { \
if (!(expr)) { \
ZLOGI("%s:%d ZASSERT(%s) fail", __FILE__, __LINE__, #expr); \
ZLOGE_BLOCK("%s:%d ZASSERT(%s) fail", __FILE__, __LINE__, #expr); \
APP_ERROR_CHECK_BOOL(false); \
} \
} while (0)

2
src/zble_module.c

@ -404,7 +404,7 @@ void zble_module_init(zble_module_cfg_t *cfg)
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = 64; //*0.625ms
init.config.ble_adv_fast_timeout = 500; //*10ms
init.config.ble_adv_fast_timeout = 100; //*10ms
init.config.ble_adv_slow_enabled = true;
init.config.ble_adv_slow_interval = 32*100;//*0.625ms

Loading…
Cancel
Save