|
|
@ -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(); |
|
|
|
} |