Guest User

Untitled

a guest
Feb 22nd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. /** @file
  2. *
  3. * @defgroup blinky_example_main main.c
  4. * @{
  5. * @ingroup blinky_example
  6. * @brief Blinky Example Application main file.
  7. *
  8. * This file contains the source code for a sample application to blink LEDs.
  9. *
  10. */
  11.  
  12. #include <stdbool.h>
  13. #include <stdint.h>
  14. #include <stdlib.h>
  15. #include "nrf_delay.h"
  16. #include "boards.h"
  17.  
  18. /**
  19. * @brief Function for application main entry.
  20. */
  21. int main(void)
  22. {
  23. /* Configure board. */
  24. bsp_board_leds_init();
  25.  
  26. /* Toggle LEDs. */
  27. while (true)
  28. {
  29. int i;
  30. i = (rand() % 4);
  31. bsp_board_led_invert(i);
  32. nrf_delay_ms(100);
  33. }
  34. }
  35.  
  36. /**
  37. *@}
  38. **/
Add Comment
Please, Sign In to add comment