Merge pull request #2649 from mubes/rs485inversionfix

Fix incorrect initialisation of default UART
This commit is contained in:
Dan Halbert 2020-02-23 07:35:20 -05:00 committed by GitHub
commit 90c67673ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,10 +114,12 @@ mp_obj_t common_hal_board_create_uart(void) {
const mcu_pin_obj_t* rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR); const mcu_pin_obj_t* rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR);
#ifdef DEFAULT_UART_RS485_INVERT #ifdef DEFAULT_UART_RS485_INVERT
const bool rs485_invert = true; const bool rs485_invert = true;
#else
const bool rs485_invert = false;
#endif #endif
#else #else
const mcu_pin_obj_t* rs485_dir = mp_const_none; const mcu_pin_obj_t* rs485_dir = mp_const_none;
const bool rs485_invert = true; const bool rs485_invert = false;
#endif #endif
common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert, common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert,