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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * Marlin 3D Printer Firmware
  3. *
  4. * Copyright (C) 2019 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 <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. #ifdef ADAFRUIT_GRAND_CENTRAL_M4
  22. /**
  23. * Framework doesn't define some serial to save sercom resources
  24. * hence if these are used I need to define them
  25. */
  26. #include "../../inc/MarlinConfig.h"
  27. #if SERIAL_PORT == 1 || SERIAL_PORT_2 == 1
  28. Uart Serial2(&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 SERIAL_PORT == 2 || SERIAL_PORT_2 == 2
  35. Uart Serial3(&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 SERIAL_PORT == 3 || SERIAL_PORT_2 == 3
  42. Uart Serial4(&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