From 361ca7d5ee8d661b72af749a02d988d580b89bc2 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 6 Sep 2023 12:33:55 +0200 Subject: [PATCH] mimxrt/mpbthciport: Enable flow control for BT HCI UART. Signed-off-by: iabdalkader --- ports/mimxrt/mpbthciport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/mimxrt/mpbthciport.c b/ports/mimxrt/mpbthciport.c index d8b3841364..2540abca42 100644 --- a/ports/mimxrt/mpbthciport.c +++ b/ports/mimxrt/mpbthciport.c @@ -85,13 +85,14 @@ int mp_bluetooth_hci_uart_init(uint32_t port, uint32_t baudrate) { mp_obj_t args[] = { MP_OBJ_NEW_SMALL_INT(port), MP_OBJ_NEW_QSTR(MP_QSTR_baudrate), MP_OBJ_NEW_SMALL_INT(baudrate), + MP_OBJ_NEW_QSTR(MP_QSTR_flow), MP_OBJ_NEW_SMALL_INT(3), MP_OBJ_NEW_QSTR(MP_QSTR_timeout), MP_OBJ_NEW_SMALL_INT(200), MP_OBJ_NEW_QSTR(MP_QSTR_timeout_char), MP_OBJ_NEW_SMALL_INT(200), MP_OBJ_NEW_QSTR(MP_QSTR_txbuf), MP_OBJ_NEW_SMALL_INT(768), MP_OBJ_NEW_QSTR(MP_QSTR_rxbuf), MP_OBJ_NEW_SMALL_INT(768), }; - mp_bthci_uart = MP_OBJ_TYPE_GET_SLOT(&machine_uart_type, make_new)((mp_obj_t)&machine_uart_type, 1, 5, args); + mp_bthci_uart = MP_OBJ_TYPE_GET_SLOT(&machine_uart_type, make_new)((mp_obj_t)&machine_uart_type, 1, 6, args); MP_STATE_PORT(mp_bthci_uart) = mp_bthci_uart; // Start the HCI polling to process any initial events/packets.