You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #include "board.h"
  2. #include "nrf_delay.h"
  3. #include "project_cfg.h"
  4. #include "sys.h"
  5. #include "version.h"
  6. #include "zble_service.h"
  7. zble_service_cfg_t cfg = {.deviceName = "iflytop"};
  8. #if 0
  9. void developer_test(void) {
  10. // 测试LED
  11. debug_light_init(DEBUG_LIGHT_IO_INDEX);
  12. // 测试BUTTON
  13. uint8_t io_index[] = {11, 12, 24};
  14. zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index));
  15. // 测试睡眠唤醒
  16. zbsp_enter_sleep(3000, 11, true);
  17. }
  18. #endif
  19. // #define BUTTON_1
  20. // #define BUTTON_2
  21. void qingfengboard_test(void) {
  22. // 测试LED
  23. debug_light_init(15);
  24. // 测试BUTTON
  25. // static uint8_t io_index[] = {ZPIN(0, 5), ZPIN(1, 9)};
  26. // zbsp_gpio_state_monitor(1000, (uint8_t*)io_index, ZARRAY_SIZE(io_index));
  27. // 测试睡眠唤醒
  28. zbsp_enter_sleep(3000, 5, true);
  29. }
  30. int main(void) {
  31. zsys_init();
  32. zble_service_init(&cfg);
  33. NRF_LOG_INFO("compile time :%s", __TIME__);
  34. NRF_LOG_INFO("Version :%d", VERSION);
  35. NRF_LOG_INFO("Manufacturer :%s", MANUFACTURER_NAME);
  36. /*******************************************************************************
  37. * *
  38. *******************************************************************************/
  39. qingfengboard_test();
  40. zsys_loop();
  41. }