Browse Source

update

master
zhaohe 1 year ago
parent
commit
dea8cb2851
  1. 14
      include/sys.h

14
include/sys.h

@ -15,6 +15,7 @@
#include "nrf.h" #include "nrf.h"
#include "nrf_ble_gatt.h" #include "nrf_ble_gatt.h"
#include "nrf_ble_qwr.h" #include "nrf_ble_qwr.h"
#include "nrf_drv_spi.h"
#include "nrf_log.h" #include "nrf_log.h"
#include "nrf_log_ctrl.h" #include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h" #include "nrf_log_default_backends.h"
@ -22,6 +23,7 @@
#include "nrf_sdh.h" #include "nrf_sdh.h"
#include "nrf_sdh_ble.h" #include "nrf_sdh_ble.h"
#include "nrf_sdh_soc.h" #include "nrf_sdh_soc.h"
// //
#include "version.h" #include "version.h"
#define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */ #define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */
@ -38,11 +40,11 @@ void zsys_loop();
#define ZPIN(port, num) NRF_GPIO_PIN_MAP(port, num) #define ZPIN(port, num) NRF_GPIO_PIN_MAP(port, num)
#define ZERROR_CHECK(err_code) \
do { \
const uint32_t LOCAL_ERR_CODE = (err_code); \
if (LOCAL_ERR_CODE != NRF_SUCCESS) { \
#define ZERROR_CHECK(err_code) \
do { \
const uint32_t LOCAL_ERR_CODE = (err_code); \
if (LOCAL_ERR_CODE != NRF_SUCCESS) { \
ZLOGI("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, LOCAL_ERR_CODE); \ ZLOGI("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, LOCAL_ERR_CODE); \
APP_ERROR_CHECK(LOCAL_ERR_CODE); \
} \
APP_ERROR_CHECK(LOCAL_ERR_CODE); \
} \
} while (0) } while (0)
Loading…
Cancel
Save