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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * Marlin 3D Printer Firmware
  3. *
  4. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  5. * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. */
  21. #ifdef ADAFRUIT_GRAND_CENTRAL_M4
  22. /**
  23. * Framework doesn't define some serials to save sercom resources
  24. * hence if these are used I need to define them
  25. */
  26. #include "../../inc/MarlinConfig.h"
  27. #if USING_SERIAL_1
  28. UartT Serial2(false, &sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);
  29. void SERCOM4_0_Handler() { Serial2.IrqHandler(); }
  30. void SERCOM4_1_Handler() { Serial2.IrqHandler(); }
  31. void SERCOM4_2_Handler() { Serial2.IrqHandler(); }
  32. void SERCOM4_3_Handler() { Serial2.IrqHandler(); }
  33. #endif
  34. #if USING_SERIAL_2
  35. UartT Serial3(false, &sercom1, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX);
  36. void SERCOM1_0_Handler() { Serial3.IrqHandler(); }
  37. void SERCOM1_1_Handler() { Serial3.IrqHandler(); }
  38. void SERCOM1_2_Handler() { Serial3.IrqHandler(); }
  39. void SERCOM1_3_Handler() { Serial3.IrqHandler(); }
  40. #endif
  41. #if USING_SERIAL_3
  42. UartT Serial4(false, &sercom5, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX);
  43. void SERCOM5_0_Handler() { Serial4.IrqHandler(); }
  44. void SERCOM5_1_Handler() { Serial4.IrqHandler(); }
  45. void SERCOM5_2_Handler() { Serial4.IrqHandler(); }
  46. void SERCOM5_3_Handler() { Serial4.IrqHandler(); }
  47. #endif
  48. #endif // ADAFRUIT_GRAND_CENTRAL_M4