Skip to content

Commit

Permalink
nimble/transport: Fix syscfg definition names for uart_ll transport
Browse files Browse the repository at this point in the history
Change BLE_TRANSPORT_UART_* in hci_uart.c to BLE_TRANSPORT_UART_LL_* to
match definitions in syscfg.yml.

uart_ll was added by 80ef459 as a copy
of existing "uart" transport. "_LL" was added to "BLE_TRANSPORT_UART_*"
definitions in syscfg.yml, but not in the hci_uart.c file.
  • Loading branch information
bojanpotocnik authored and andrzej-kaczmarek committed May 14, 2024
1 parent f3afc17 commit 5f2aa28
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions nimble/transport/uart_ll/src/hci_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,31 +136,31 @@ hci_uart_configure(void)
enum hal_uart_flow_ctl flowctl;
int rc;

rc = hal_uart_init_cbs(MYNEWT_VAL(BLE_TRANSPORT_UART_PORT),
rc = hal_uart_init_cbs(MYNEWT_VAL(BLE_TRANSPORT_UART_LL_PORT),
hci_uart_tx_char, NULL,
hci_uart_rx_char, NULL);
if (rc != 0) {
return -1;
}

if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_PARITY, odd)) {
if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_LL_PARITY, odd)) {
parity = HAL_UART_PARITY_ODD;
} else if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_PARITY, even)) {
} else if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_LL_PARITY, even)) {
parity = HAL_UART_PARITY_EVEN;
} else {
parity = HAL_UART_PARITY_NONE;
}

if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_FLOW_CONTROL, rtscts)) {
if (MYNEWT_VAL_CHOICE(BLE_TRANSPORT_UART_LL_FLOW_CONTROL, rtscts)) {
flowctl = HAL_UART_FLOW_CTL_RTS_CTS;
} else {
flowctl = HAL_UART_FLOW_CTL_NONE;
}

rc = hal_uart_config(MYNEWT_VAL(BLE_TRANSPORT_UART_PORT),
MYNEWT_VAL(BLE_TRANSPORT_UART_BAUDRATE),
MYNEWT_VAL(BLE_TRANSPORT_UART_DATA_BITS),
MYNEWT_VAL(BLE_TRANSPORT_UART_STOP_BITS),
rc = hal_uart_config(MYNEWT_VAL(BLE_TRANSPORT_UART_LL_PORT),
MYNEWT_VAL(BLE_TRANSPORT_UART_LL_BAUDRATE),
MYNEWT_VAL(BLE_TRANSPORT_UART_LL_DATA_BITS),
MYNEWT_VAL(BLE_TRANSPORT_UART_LL_STOP_BITS),
parity, flowctl);
if (rc != 0) {
return -1;
Expand Down Expand Up @@ -192,7 +192,7 @@ ble_transport_to_ll_cmd_impl(void *buf)
STAILQ_INSERT_TAIL(&tx_q, txe, tx_q_next);
OS_EXIT_CRITICAL(sr);

hal_uart_start_tx(MYNEWT_VAL(BLE_TRANSPORT_UART_PORT));
hal_uart_start_tx(MYNEWT_VAL(BLE_TRANSPORT_UART_LL_PORT));

return 0;
}
Expand Down Expand Up @@ -220,7 +220,7 @@ ble_transport_to_ll_acl_impl(struct os_mbuf *om)
STAILQ_INSERT_TAIL(&tx_q, txe, tx_q_next);
OS_EXIT_CRITICAL(sr);

hal_uart_start_tx(MYNEWT_VAL(BLE_TRANSPORT_UART_PORT));
hal_uart_start_tx(MYNEWT_VAL(BLE_TRANSPORT_UART_LL_PORT));

return 0;
}
Expand Down

0 comments on commit 5f2aa28

Please sign in to comment.