Browse Source

mimxrt/mpbthciport: Enable flow control for BT HCI UART.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
pull/12376/head
iabdalkader 1 year ago
committed by Damien George
parent
commit
361ca7d5ee
  1. 3
      ports/mimxrt/mpbthciport.c

3
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.

Loading…
Cancel
Save