summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r--stmhal/uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c
index a85f7f9e3a..9436c2938b 100644
--- a/stmhal/uart.c
+++ b/stmhal/uart.c
@@ -289,7 +289,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, uint n_args, const mp
if (vals[3].u_obj == mp_const_none) {
init->Parity = UART_PARITY_NONE;
} else {
- machine_int_t parity = mp_obj_get_int(vals[3].u_obj);
+ mp_int_t parity = mp_obj_get_int(vals[3].u_obj);
init->Parity = (parity & 1) ? UART_PARITY_ODD : UART_PARITY_EVEN;
}
init->Mode = UART_MODE_TX_RX;