application.c 917 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2015, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2015-03-01 Yangfs the first version
  13. * 2015-03-27 Bernard code cleanup.
  14. */
  15. /**
  16. * @addtogroup NRF52832
  17. */
  18. /*@{*/
  19. #include <rtthread.h>
  20. #ifdef RT_USING_FINSH
  21. #include <finsh.h>
  22. #include <shell.h>
  23. #endif
  24. #include <nrf_gpio.h>
  25. #define DK_BOARD_LED_1 13
  26. int main(void)
  27. {
  28. int count = 1;
  29. nrf_gpio_cfg_output(DK_BOARD_LED_1);
  30. while (count++)
  31. {
  32. nrf_gpio_pin_set(DK_BOARD_LED_1);
  33. rt_thread_mdelay(500);
  34. nrf_gpio_pin_clear(DK_BOARD_LED_1);
  35. rt_thread_mdelay(500);
  36. }
  37. return RT_EOK;
  38. }
  39. /*@}*/