Skip to content

Commit

Permalink
Added default configuration for TMC UART pins
Browse files Browse the repository at this point in the history
  • Loading branch information
gloomyandy committed Feb 10, 2020
1 parent 7a5143b commit e99356e
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/LPC/Boards/AzsmzMini.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ constexpr BoardDefaults azsmzDefaults = {
{P0_4, P0_10, P0_19, P0_21, P4_29}, //enablePins
{P2_0, P2_1, P2_2, P2_3, P2_8}, //stepPins
{P0_5, P0_11, P0_20, P0_22, P2_13}, //dirPins
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
0, //digiPot Factor
};

Expand Down
5 changes: 4 additions & 1 deletion src/LPC/Boards/AzteegX5Mini.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ constexpr BoardDefaults azteegX5Mini1_1Defaults = {
{P0_10, P0_19, P0_21, P0_4, NoPin}, //enablePins
{P2_1, P2_2, P2_3, P2_0, NoPin}, //stepPins
{P0_11, P0_20, P0_22, P0_5, NoPin}, //dirPins
106.0, //digiPot Factor
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
106.0, //digiPot Factor
};


Expand Down
15 changes: 12 additions & 3 deletions src/LPC/Boards/BIQU_SKR.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ constexpr BoardDefaults biquskr_1_1_Defaults = {
{P4_28, P2_0, P0_19, P2_12, P0_10}, //enablePins
{P0_4, P2_1, P0_20, P0_11, P0_1}, //stepPins
{P0_5, P2_2, P0_21, P2_13, P0_0}, //dirPins
0, //digiPot Factor
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
0 , //digiPot Factor
};


Expand Down Expand Up @@ -157,7 +160,10 @@ constexpr BoardDefaults biquskr_1_3_Defaults = {
{P2_1, P2_8, P0_21, P2_12, P0_10}, //enablePins
{P2_2, P0_19, P0_22, P2_13, P0_1}, //stepPins
{P2_6, P0_20, P2_11, P0_11, P0_0}, //dirPins
0 //digiPot Factor
#if LPC_TMC_SOFT_UART
{P1_17, P1_15, P1_10, P1_8, P1_1}, //uartPins
#endif
0, //digiPot Factor
};


Expand Down Expand Up @@ -241,7 +247,10 @@ constexpr BoardDefaults biquskr_1_4_Defaults = {
{P2_1, P2_8, P0_21, P2_12, P1_16}, //enablePins
{P2_2, P0_19, P0_22, P2_13, P1_15}, //stepPins
{P2_6, P0_20, P2_11, P0_11, P1_14}, //dirPins
0 //digiPot Factor
#if LPC_TMC_SOFT_UART
{P1_10, P1_9, P1_8, P1_4, P1_1}, //uartPins
#endif
0, //digiPot Factor
};

#endif
5 changes: 4 additions & 1 deletion src/LPC/Boards/Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ constexpr BoardDefaults genericDefaults = {
{NoPin, NoPin, NoPin, NoPin, NoPin}, //enablePins
{NoPin, NoPin, NoPin, NoPin, NoPin}, //stepPins
{NoPin, NoPin, NoPin, NoPin, NoPin}, //dirPins
0, //digiPot Factor
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
0 , //digiPot Factor
};

#endif
3 changes: 3 additions & 0 deletions src/LPC/Boards/MKSSBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ constexpr BoardDefaults mkssbase1_3_Defaults = {
{P0_4, P0_10, P0_19, P0_21, P4_29}, //enablePins
{P2_0, P2_1, P2_2, P2_3, P2_8}, //stepPins
{P0_5, P0_11, P0_20, P0_22, P2_13}, //dirPins
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
113.33, //digiPot Factor
};

Expand Down
3 changes: 3 additions & 0 deletions src/LPC/Boards/Mbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ constexpr BoardDefaults mbedDefaults =
{P3_25, P0_10, P0_19, P0_21, P4_29}, //enablePins
{P2_11, P2_12, P2_10, P2_3, P2_8}, //stepPins
{P3_26, P4_28, P0_20, P0_22, P2_13}, //dirPins
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
0, //digiPot Factor
};

Expand Down
3 changes: 3 additions & 0 deletions src/LPC/Boards/ReArm.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ constexpr BoardDefaults rearmDefaults = {
{P0_10, P0_19, P0_21, P0_4, P4_29}, //enablePins
{P2_1, P2_2, P2_3, P2_0, P2_8}, //stepPins
{P0_11, P0_20, P0_22, P0_5, P2_13}, //dirPins
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
0, //digiPot Factor
};

Expand Down
3 changes: 3 additions & 0 deletions src/LPC/Boards/Smoothieboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ constexpr BoardDefaults smoothieBoardDefaults = {
{P0_4, P0_10, P0_19, P0_21, P4_29}, //enablePins
{P2_0, P2_1, P2_2, P2_3, P2_8}, //stepPins
{P0_5, P0_11, P0_20, P0_22, P2_13}, //dirPins
#if LPC_TMC_SOFT_UART
{NoPin, NoPin, NoPin, NoPin, NoPin}, //uartPins
#endif
113.33, //digiPot Factor
};

Expand Down
4 changes: 4 additions & 0 deletions src/LPC/Pins_LPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ bool SetBoard(const char* bn) noexcept
SetDefaultPinArray(LPC_Boards[i].defaults.enablePins, ENABLE_PINS, MaxTotalDrivers);
SetDefaultPinArray(LPC_Boards[i].defaults.stepPins, STEP_PINS, MaxTotalDrivers);
SetDefaultPinArray(LPC_Boards[i].defaults.dirPins, DIRECTION_PINS, MaxTotalDrivers);
#if LPC_TMC_SOFT_UART
SetDefaultPinArray(LPC_Boards[i].defaults.uartPins, TMC_UART_PINS, MaxTotalDrivers);
#endif


digipotFactor = LPC_Boards[i].defaults.digipotFactor;

Expand Down
3 changes: 3 additions & 0 deletions src/LPC/Pins_LPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ struct BoardDefaults
const Pin enablePins[NumDirectDrivers];
const Pin stepPins[NumDirectDrivers];
const Pin dirPins[NumDirectDrivers];
#if LPC_TMC_SOFT_UART
const Pin uartPins[NumDirectDrivers];
#endif
const float digipotFactor;
};

Expand Down

0 comments on commit e99356e

Please sign in to comment.