diff options
author | Manuel Coenen <manuel@duet3d.com> | 2021-01-26 14:33:52 +0300 |
---|---|---|
committer | Manuel Coenen <manuel@duet3d.com> | 2021-01-26 14:33:52 +0300 |
commit | 93fa897014e5e78df6667211e4dab87625f7b800 (patch) | |
tree | a814aadad2b430925a8cba70a1c1227503edd06f /src/Movement | |
parent | 806d32c60b784d29b908e07d9c97d3d81714ff79 (diff) |
Convert Maestro build to CoreN2G
Diffstat (limited to 'src/Movement')
-rw-r--r-- | src/Movement/StepTimer.cpp | 2 | ||||
-rw-r--r-- | src/Movement/StepperDrivers/TMC22xx.cpp | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/Movement/StepTimer.cpp b/src/Movement/StepTimer.cpp index 4046db18..cf69fc22 100644 --- a/src/Movement/StepTimer.cpp +++ b/src/Movement/StepTimer.cpp @@ -21,7 +21,7 @@ # include <hri_tc_e54.h> #elif !defined(__LPC17xx__) # include <tc/tc.h> -# if SAME70 || SAM4E +# if SAME70 || SAM4E || SAM4S # include <pmc/pmc.h> # endif #endif diff --git a/src/Movement/StepperDrivers/TMC22xx.cpp b/src/Movement/StepperDrivers/TMC22xx.cpp index 7236a3fc..a1e8e780 100644 --- a/src/Movement/StepperDrivers/TMC22xx.cpp +++ b/src/Movement/StepperDrivers/TMC22xx.cpp @@ -49,8 +49,9 @@ # include <Serial.h> # include <component/sercom.h> #else -# include <sam/drivers/pdc/pdc.h> -# include <sam/drivers/uart/uart.h> +# include <pdc/pdc.h> +# include <pmc/pmc.h> +# include <uart/uart.h> #endif #if HAS_STALL_DETECT @@ -1856,7 +1857,9 @@ void SmartDrivers::Init() noexcept DmacManager::SetInterruptCallback(DmacChanTmcRx, TransferCompleteCallback, CallbackParameter(0)); # else // Set up the single UART that communicates with all TMC22xx drivers - ConfigurePin(TMC22xx_UART_PINS); // the pins are already set up for UART use in the pins table + SetPinFunction(TMC22xxUartTxPin, TMC22xxUartPeriphMode); + SetPinFunction(TMC22xxUartRxPin, TMC22xxUartPeriphMode); + SetPullup(TMC22xxUartRxPin, true); // Enable the clock to the UART pmc_enable_periph_clk(ID_TMC22xx_UART); |