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.

MarlinSerial_AGCM4.cpp 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. /**
  23. * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
  24. */
  25. #ifdef ADAFRUIT_GRAND_CENTRAL_M4
  26. /**
  27. * Framework doesn't define some serials to save sercom resources
  28. * hence if these are used I need to define them
  29. */
  30. #include "../../inc/MarlinConfig.h"
  31. #if USING_HW_SERIAL1
  32. UartT Serial2(false, &sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);
  33. void SERCOM4_0_Handler() { Serial2.IrqHandler(); }
  34. void SERCOM4_1_Handler() { Serial2.IrqHandler(); }
  35. void SERCOM4_2_Handler() { Serial2.IrqHandler(); }
  36. void SERCOM4_3_Handler() { Serial2.IrqHandler(); }
  37. #endif
  38. #if USING_HW_SERIAL2
  39. UartT Serial3(false, &sercom1, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX);
  40. void SERCOM1_0_Handler() { Serial3.IrqHandler(); }
  41. void SERCOM1_1_Handler() { Serial3.IrqHandler(); }
  42. void SERCOM1_2_Handler() { Serial3.IrqHandler(); }
  43. void SERCOM1_3_Handler() { Serial3.IrqHandler(); }
  44. #endif
  45. #if USING_HW_SERIAL3
  46. UartT Serial4(false, &sercom5, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX);
  47. void SERCOM5_0_Handler() { Serial4.IrqHandler(); }
  48. void SERCOM5_1_Handler() { Serial4.IrqHandler(); }
  49. void SERCOM5_2_Handler() { Serial4.IrqHandler(); }
  50. void SERCOM5_3_Handler() { Serial4.IrqHandler(); }
  51. #endif
  52. #endif // ADAFRUIT_GRAND_CENTRAL_M4