test.c 381 B

1234567891011121314151617181920
  1. #include "nil.h"
  2. #include "hal.h"
  3. #include "test.h"
  4. /*
  5. * This is a periodic thread that does absolutely nothing except flashing
  6. * a LED.
  7. */
  8. THD_WORKING_AREA(waThread1, 128);
  9. THD_FUNCTION(Thread1, arg) {
  10. (void)arg;
  11. while (true) {
  12. palSetPad(GPIOC, GPIOC_LED4);
  13. chThdSleepMilliseconds(500);
  14. palClearPad(GPIOC, GPIOC_LED4);
  15. chThdSleepMilliseconds(500);
  16. }
  17. }