Browse Source

update

3lead_uart_test_ok_version
zhaohe 1 year ago
parent
commit
8e02c081b4
  1. 3
      .vscode/settings.json
  2. 6
      app/config/sdk_config.h
  3. 38
      app/main.c

3
.vscode/settings.json

@ -36,6 +36,7 @@
"board.h": "c",
"stdio.h": "c",
"nrf_log_ctrl.h": "c",
"nrf_log_default_backends.h": "c"
"nrf_log_default_backends.h": "c",
"nrf_delay.h": "c"
}
}

6
app/config/sdk_config.h

@ -7606,7 +7606,7 @@
// <e> NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
//==========================================================
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#define NRF_LOG_BACKEND_RTT_ENABLED 0
#endif
// <o> NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE - Size of buffer for partially processed strings.
// <i> Size of the buffer is a trade-off between RAM usage and processing.
@ -7639,7 +7639,7 @@
// <e> NRF_LOG_ENABLED - nrf_log - Logger
//==========================================================
#ifndef NRF_LOG_ENABLED
#define NRF_LOG_ENABLED 1
#define NRF_LOG_ENABLED 0
#endif
// <h> Log message pool - Configuration of log message pool
@ -10590,7 +10590,7 @@
#ifndef NRF_LOG_STR_FORMATTER_TIMESTAMP_FORMAT_ENABLED
#define NRF_LOG_STR_FORMATTER_TIMESTAMP_FORMAT_ENABLED 1
#define NRF_LOG_STR_FORMATTER_TIMESTAMP_FORMAT_ENABLED 0
#endif
// </h>

38
app/main.c

@ -1,4 +1,5 @@
#include "board.h"
#include "nrf_delay.h"
#include "project_cfg.h"
#include "sys.h"
#include "version.h"
@ -30,19 +31,44 @@ void qingfengboard_test(void) {
zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index));
//
// zbsp_enter_sleep(3000, 5, true);
zbsp_enter_sleep(3000, 5, true);
}
int main(void) {
zsys_init();
// zsys_init();
NRF_LOG_INFO("compile time :%s", __TIME__);
NRF_LOG_INFO("Version :%d", VERSION);
NRF_LOG_INFO("Manufacturer :%s", MANUFACTURER_NAME);
// NRF_LOG_INFO("compile time :%s", __TIME__);
// NRF_LOG_INFO("Version :%d", VERSION);
// NRF_LOG_INFO("Manufacturer :%s", MANUFACTURER_NAME);
/*******************************************************************************
* *
*******************************************************************************/
qingfengboard_test();
// qingfengboard_test();
// ret_code_t err_code = NRF_LOG_INIT(NULL);
// APP_ERROR_CHECK(err_code);
// NRF_LOG_DEFAULT_BACKENDS_INIT();
nrf_pwr_mgmt_init();
nrf_gpio_cfg(15, //
NRF_GPIO_PIN_DIR_OUTPUT, //
NRF_GPIO_PIN_INPUT_DISCONNECT, //
NRF_GPIO_PIN_PULLUP, //
NRF_GPIO_PIN_S0S1, //
NRF_GPIO_PIN_NOSENSE);
nrf_delay_ms(1000);
for (size_t i = 0; i < 3; i++) {
nrf_gpio_pin_set(15);
nrf_delay_ms(300);
nrf_gpio_pin_clear(15);
nrf_delay_ms(300);
}
sd_power_system_off();
for (size_t i = 0; i < 3; i++) {
nrf_gpio_pin_set(15);
nrf_delay_ms(100);
nrf_gpio_pin_clear(15);
nrf_delay_ms(100);
}
zsys_loop();
}
Loading…
Cancel
Save