ZuluSCSI_main.cpp 595 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Simple wrapper file that diverts boot from main program to bootloader
  2. // when building the bootloader image by build_bootloader.py.
  3. #ifdef ZULUSCSI_BOOTLOADER_MAIN
  4. extern "C" int bootloader_main(void);
  5. int main(void)
  6. {
  7. return bootloader_main();
  8. }
  9. #else
  10. extern "C" void zuluscsi_setup(void);
  11. extern "C" void zuluscsi_main_loop(void);
  12. #ifdef USE_ARDUINO
  13. extern "C" void setup(void)
  14. {
  15. zuluscsi_setup();
  16. }
  17. extern "C" void loop(void)
  18. {
  19. zuluscsi_main_loop();
  20. }
  21. #else
  22. int main(void)
  23. {
  24. zuluscsi_setup();
  25. while (1)
  26. {
  27. zuluscsi_main_loop();
  28. }
  29. }
  30. #endif
  31. #endif