test.c 421 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(GPIOD, GPIOD_LED3); /* Orange. */
  13. chThdSleepMilliseconds(500);
  14. palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
  15. chThdSleepMilliseconds(500);
  16. }
  17. }