Brak opisu
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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 "main.h"
  26. #define WATCHDOG_PERIOD_MS 100
  27. int main(void) {
  28. watchdog_enable(WATCHDOG_PERIOD_MS, 1);
  29. stdio_init_all();
  30. buttons_init();
  31. lcd_init();
  32. sequence_init();
  33. printf("init done\n");
  34. while (1) {
  35. watchdog_update();
  36. buttons_run();
  37. encoder_run();
  38. sequence_run();
  39. }
  40. return 0;
  41. }