My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

Marduino.h 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * HAL/shared/Marduino.h
  25. */
  26. #undef DISABLED // Redefined by ESP32
  27. #undef M_PI // Redefined by all
  28. #undef _BV // Redefined by some
  29. #undef sq // Redefined by teensy3/wiring.h
  30. #undef SBI // Redefined by arduino/const_functions.h
  31. #undef CBI // Redefined by arduino/const_functions.h
  32. #undef UNUSED // Redefined by stm32f4xx_hal_def.h
  33. #include <Arduino.h> // NOTE: If included earlier then this line is a NOOP
  34. #undef DISABLED
  35. #define DISABLED(V...) DO(DIS,&&,V)
  36. #undef _BV
  37. #define _BV(b) (1UL << (b))
  38. #undef sq
  39. #define sq(x) ((x)*(x))
  40. #ifndef SBI
  41. #define SBI(A,B) (A |= (1 << (B)))
  42. #endif
  43. #ifndef CBI
  44. #define CBI(A,B) (A &= ~(1 << (B)))
  45. #endif
  46. #ifndef __AVR__
  47. #ifndef strchr_P // Some platforms define a macro (DUE, teensy35)
  48. inline const char* strchr_P(const char *s, int c) { return strchr(s,c); }
  49. //#define strchr_P(s,c) strchr(s,c)
  50. #endif
  51. #ifndef snprintf_P
  52. #define snprintf_P snprintf
  53. #endif
  54. #ifndef vsnprintf_P
  55. #define vsnprintf_P vsnprintf
  56. #endif
  57. #endif
  58. // Restart causes
  59. #define RST_POWER_ON 1
  60. #define RST_EXTERNAL 2
  61. #define RST_BROWN_OUT 4
  62. #define RST_WATCHDOG 8
  63. #define RST_JTAG 16
  64. #define RST_SOFTWARE 32
  65. #define RST_BACKUP 64
  66. #ifndef M_PI
  67. #define M_PI 3.14159265358979323846f
  68. #endif
  69. // Remove compiler warning on an unused variable
  70. #ifndef UNUSED
  71. #define UNUSED(x) ((void)(x))
  72. #endif