0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-10 11:47:53 +00:00
MarlinFirmware/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp

55 lines
2 KiB
C++
Raw Normal View History

2019-07-28 19:48:29 +00:00
/**
* Marlin 3D Printer Firmware
*
2020-02-03 14:00:57 +00:00
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
2019-07-28 19:48:29 +00:00
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2020-07-23 03:20:14 +00:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2019-07-28 19:48:29 +00:00
*
*/
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
/**
* Framework doesn't define some serials to save sercom resources
2019-07-28 19:48:29 +00:00
* hence if these are used I need to define them
*/
#include "../../inc/MarlinConfig.h"
2021-02-02 22:00:02 +00:00
#if ANY_SERIAL_IS(1)
UartT Serial2(false, &sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);
2019-07-28 19:48:29 +00:00
void SERCOM4_0_Handler() { Serial2.IrqHandler(); }
void SERCOM4_1_Handler() { Serial2.IrqHandler(); }
void SERCOM4_2_Handler() { Serial2.IrqHandler(); }
void SERCOM4_3_Handler() { Serial2.IrqHandler(); }
#endif
2021-02-02 22:00:02 +00:00
#if ANY_SERIAL_IS(2)
UartT Serial3(false, &sercom1, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX);
2019-07-28 19:48:29 +00:00
void SERCOM1_0_Handler() { Serial3.IrqHandler(); }
void SERCOM1_1_Handler() { Serial3.IrqHandler(); }
void SERCOM1_2_Handler() { Serial3.IrqHandler(); }
void SERCOM1_3_Handler() { Serial3.IrqHandler(); }
#endif
2021-02-02 22:00:02 +00:00
#if ANY_SERIAL_IS(3)
UartT Serial4(false, &sercom5, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX);
2019-07-28 19:48:29 +00:00
void SERCOM5_0_Handler() { Serial4.IrqHandler(); }
void SERCOM5_1_Handler() { Serial4.IrqHandler(); }
void SERCOM5_2_Handler() { Serial4.IrqHandler(); }
void SERCOM5_3_Handler() { Serial4.IrqHandler(); }
#endif
#endif // ADAFRUIT_GRAND_CENTRAL_M4