No Description
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.c 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * main.c
  3. *
  4. * Copyright (c) 2024 Thomas Buck (thomas@xythobuz.de)
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * See <http://www.gnu.org/licenses/>.
  17. */
  18. #include <stdio.h>
  19. #include "pico/stdlib.h"
  20. #include "hardware/watchdog.h"
  21. #include "buttons.h"
  22. #include "encoder.h"
  23. #include "lcd.h"
  24. #include "sequence.h"
  25. #include "ui.h"
  26. #include "main.h"
  27. #define WATCHDOG_PERIOD_MS 100
  28. int main(void) {
  29. watchdog_enable(WATCHDOG_PERIOD_MS, 1);
  30. stdio_init_all();
  31. buttons_init();
  32. lcd_init();
  33. sequence_init();
  34. ui_init();
  35. printf("init done\n");
  36. while (1) {
  37. watchdog_update();
  38. buttons_run();
  39. encoder_run();
  40. sequence_run();
  41. }
  42. return 0;
  43. }