Skip to content

Commit 39c89b9

Browse files
committed
Use named constant instead of magic number.
1 parent d460614 commit 39c89b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Braccio++.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ BraccioClass::BraccioClass()
6363

6464
bool BraccioClass::begin(voidFuncPtr custom_menu)
6565
{
66+
static int constexpr RS485_RX_PIN = 1;
67+
6668
SPI.begin();
6769
Wire.begin();
6870
Serial.begin(115200);
6971

7072
pinMode(PIN_FUSB302_INT, INPUT_PULLUP);
73+
pinMode(RS485_RX_PIN, INPUT_PULLUP);
7174

7275
static rtos::Thread th(osPriorityHigh);
7376
th.start(mbed::callback(this, &BraccioClass::pd_thread));
@@ -83,7 +86,6 @@ bool BraccioClass::begin(voidFuncPtr custom_menu)
8386
*/
8487

8588
button_init();
86-
pinMode(1, INPUT_PULLUP);
8789

8890
if (!expander_init()) return false;
8991

0 commit comments

Comments
 (0)