|
@ -6,17 +6,43 @@ |
|
|
|
|
|
|
|
|
zble_service_cfg_t cfg = {.deviceName = "iflytop"}; |
|
|
zble_service_cfg_t cfg = {.deviceName = "iflytop"}; |
|
|
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
|
void developer_test(void) { |
|
|
|
|
|
// 测试LED |
|
|
|
|
|
debug_light_init(DEBUG_LIGHT_IO_INDEX); |
|
|
|
|
|
|
|
|
|
|
|
// 测试BUTTON |
|
|
|
|
|
uint8_t io_index[] = {11, 12, 24}; |
|
|
|
|
|
zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index)); |
|
|
|
|
|
|
|
|
|
|
|
// 测试睡眠唤醒 |
|
|
|
|
|
zbsp_enter_sleep(3000, 11, true); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
// #define BUTTON_1 |
|
|
|
|
|
// #define BUTTON_2 |
|
|
|
|
|
void qingfengboard_test(void) { |
|
|
|
|
|
// 测试LED |
|
|
|
|
|
debug_light_init(15); |
|
|
|
|
|
|
|
|
|
|
|
// 测试BUTTON |
|
|
|
|
|
static uint8_t io_index[] = {ZPIN(0, 5), ZPIN(1, 9)}; |
|
|
|
|
|
zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index)); |
|
|
|
|
|
|
|
|
|
|
|
// 测试睡眠唤醒 |
|
|
|
|
|
// zbsp_enter_sleep(3000, 5, true); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
int main(void) { |
|
|
int main(void) { |
|
|
zsys_init(); |
|
|
zsys_init(); |
|
|
|
|
|
|
|
|
debug_light_init(DEBUG_LIGHT_IO_INDEX); // |
|
|
|
|
|
|
|
|
|
|
|
NRF_LOG_INFO("compile time :%s", __TIME__); |
|
|
NRF_LOG_INFO("compile time :%s", __TIME__); |
|
|
NRF_LOG_INFO("Version :%d", VERSION); |
|
|
NRF_LOG_INFO("Version :%d", VERSION); |
|
|
NRF_LOG_INFO("Manufacturer :%s", MANUFACTURER_NAME); |
|
|
NRF_LOG_INFO("Manufacturer :%s", MANUFACTURER_NAME); |
|
|
|
|
|
|
|
|
uint8_t io_index[] = {11, 12, 24}; |
|
|
|
|
|
zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************* |
|
|
|
|
|
* 开发板测试 * |
|
|
|
|
|
*******************************************************************************/ |
|
|
|
|
|
qingfengboard_test(); |
|
|
zsys_loop(); |
|
|
zsys_loop(); |
|
|
} |
|
|
} |