diff --git a/app/app.uvoptx b/app/app.uvoptx
index ff4cb7f..0654d60 100644
--- a/app/app.uvoptx
+++ b/app/app.uvoptx
@@ -135,6 +135,7 @@
0
DLGUARM
+ d
0
@@ -147,24 +148,7 @@
UL2CM3(-S0 -C0 -P0 -FD20000000 -FC4000 -FN2 -FF0nrf52xxx -FS00 -FL0200000 -FF1nrf52xxx_uicr -FS110001000 -FL11000 -FP0($$Device:nRF52833_xxAA$Flash\nrf52xxx.flm) -FP1($$Device:nRF52833_xxAA$Flash\nrf52xxx_uicr.flm))
-
-
- 0
- 0
- 116
- 1
- 163038
- 0
- 0
- 0
- 0
- 0
- 1
- .\src\board\board_sdcard_driver.c
-
- \\nrf52833_xxaa\src/board/board_sdcard_driver.c\116
-
-
+
0
diff --git a/app/src/app_event_distribute.c b/app/src/app_event_distribute.c
index 8b66357..07a00a6 100644
--- a/app/src/app_event_distribute.c
+++ b/app/src/app_event_distribute.c
@@ -15,7 +15,7 @@ static void app_event_process_cb(void* p_event_data, uint16_t event_size) {
}
void AppEvent_regListener(app_event_listener_t listener) { //
- m_listener[m_listener_num].cbfunc = listener;
+ m_listener[m_listener_num++].cbfunc = listener;
}
void AppEvent_pushEvent(app_event_t* event) { //
diff --git a/app/src/board/board_button.c b/app/src/board/board_button.c
index 56d5eba..69be33a 100644
--- a/app/src/board/board_button.c
+++ b/app/src/board/board_button.c
@@ -18,10 +18,10 @@ static app_button_cfg_t buttons[] = {
};
void BoardButton_Init(board_button_cb_t cb) { //
m_cb = cb;
- ZASSERT(app_button_init(buttons, ARRAY_SIZE(buttons), BUTTON_DETECTION_DELAY));
+ ZERROR_CHECK(app_button_init(buttons, ARRAY_SIZE(buttons), BUTTON_DETECTION_DELAY));
}
-void BoardButton_load() { ZASSERT(app_button_enable()); }
-void BoardButton_unload() { ZASSERT(app_button_disable()); }
+void BoardButton_load() { ZERROR_CHECK(app_button_enable()); }
+void BoardButton_unload() { ZERROR_CHECK(app_button_disable()); }
void BoardButton_enable_sense() {
app_button_disable();
diff --git a/app/src/device_ctrl_service.c b/app/src/device_ctrl_service.c
index c71ddc5..c2daf1f 100644
--- a/app/src/device_ctrl_service.c
+++ b/app/src/device_ctrl_service.c
@@ -74,6 +74,7 @@ static void poweroff() {
BoardButton_enable_sense();
// 系统进入深度睡眠
sd_power_system_off();
+ NVIC_SystemReset();
m_ispoweron = false;
}
static void poweron() {
diff --git a/app/src/heart_wave_sample_service.c b/app/src/heart_wave_sample_service.c
index cf662f5..5faa8c5 100644
--- a/app/src/heart_wave_sample_service.c
+++ b/app/src/heart_wave_sample_service.c
@@ -159,7 +159,17 @@ static void ads1293_spi_tx_rx_1(uint8_t* tx, uint8_t* rx, uint8_t len) {
static void ads1293_spi_writereg_and_check(ads1293_t* ads, uint8_t addr, uint8_t data) {
uint8_t readbak = 0;
// readonly add
- if (addr == 0x19 || addr == 0x1a || addr == 0x1b || addr == 0x1c || addr == 0x40 || addr == 0x30) {
+ readbak = data;
+ if (addr >= 0x18 && addr <= 0x1E) {
+ return;
+ }
+ if (addr >= 0x30 && addr <= 0x3f) {
+ return;
+ }
+ if (addr == 0x40) {
+ return;
+ }
+ if (addr == 0x50) {
return;
}
ads1293_spi_writereg_and_readbak(ads, addr, data, &readbak);
@@ -195,6 +205,8 @@ static void ads1293_init() {
ads1293_spi_init(&m_ads1293_0, ads1293_spi_tx_rx_0);
ads1293_spi_init(&m_ads1293_1, ads1293_spi_tx_rx_1);
+ m_ads1293_driver_is_inited = true;
+
uint8_t revid = ads1293_spi_readreg(&m_ads1293_0, TI_ADS1293_REVID_REG);
ZLOGI("ads1293_0 revid: %d\n", revid);
revid = ads1293_spi_readreg(&m_ads1293_1, TI_ADS1293_REVID_REG);
@@ -208,14 +220,13 @@ static void ads1293_init() {
for (uint16_t i = 0; i < ZARRAY_SIZE(m_prvads1cfg); i++) {
ads1293_spi_writereg_and_check(&m_ads1293_1, m_prvads1cfg[i].add, m_prvads1cfg[i].data);
}
- m_ads1293_driver_is_inited = true;
/**
* @brief READY引脚中断初始化
*/
{
// nrf_gpio_cfg_input(ADS1293_READY_PIN, NRF_GPIO_PIN_PULLUP);
- ZERROR_CHECK(nrfx_gpiote_init());
+ // ZERROR_CHECK(nrfx_gpiote_init());
nrf_drv_gpiote_in_config_t inConfig = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false); // 双边沿中断触发
inConfig.pull = NRF_GPIO_PIN_PULLUP; // 默认上拉
inConfig.sense = NRF_GPIOTE_POLARITY_LOTOHI; // 上升沿触发
diff --git a/libznordic b/libznordic
index 44e3c04..05065fd 160000
--- a/libznordic
+++ b/libznordic
@@ -1 +1 @@
-Subproject commit 44e3c0469ba810f63f28577799e230c849c5c613
+Subproject commit 05065fdb3d74e3c973298d5f4f286f9934631637