application.c 962 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <drv_gpio.h>
  25. #define DK_BOARD_LED_1 13
  26. int main(void)
  27. {
  28. int count = 1;
  29. rt_pin_mode(DK_BOARD_LED_1, PIN_MODE_OUTPUT);
  30. while (count++)
  31. {
  32. rt_pin_write(DK_BOARD_LED_1, PIN_HIGH);
  33. rt_thread_mdelay(500);
  34. rt_pin_write(DK_BOARD_LED_1, PIN_LOW);
  35. rt_thread_mdelay(500);
  36. }
  37. return RT_EOK;
  38. }
  39. /*@}*/