Skip to content

Commit 90c6767

Browse files
authored
Merge pull request #2649 from mubes/rs485inversionfix
Fix incorrect initialisation of default UART
2 parents dcc8abf + d41cf2e commit 90c6767

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shared-module/board/__init__.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ mp_obj_t common_hal_board_create_uart(void) {
114114
const mcu_pin_obj_t* rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR);
115115
#ifdef DEFAULT_UART_RS485_INVERT
116116
const bool rs485_invert = true;
117+
#else
118+
const bool rs485_invert = false;
117119
#endif
118120
#else
119121
const mcu_pin_obj_t* rs485_dir = mp_const_none;
120-
const bool rs485_invert = true;
122+
const bool rs485_invert = false;
121123
#endif
122124

123125
common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert,

0 commit comments

Comments
 (0)