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.

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