Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 389B

1234567891011121314151617181920
  1. //#include "mbed.h"
  2. #include "MK20D5.h"
  3. #include "wait.h"
  4. #include "gpio_api.h"
  5. #include "PinNames.h"
  6. int main() {
  7. gpio_t led;
  8. gpio_init_out(&led, PTA19);
  9. while(1) {
  10. wait_ms(500);
  11. uint32_t delay = 0xf;
  12. while (delay--) {
  13. uint32_t delay2 = 0xffff;
  14. while (delay2--) ;
  15. }
  16. gpio_write(&led, !gpio_read(&led));
  17. }
  18. }