适配新班子
This commit is contained in:
@@ -24,7 +24,7 @@ void jj_bt_init()
|
||||
{
|
||||
uart_init(BT_UART_INDEX, BT_UART_BAUDRATE, BT_UART_TX_PIN, BT_UART_RX_PIN);
|
||||
// uart_tx_interrupt(UART_2, 1);
|
||||
uart_rx_interrupt(UART_8, ENABLE);
|
||||
uart_rx_interrupt(BT_UART_INDEX, ENABLE);
|
||||
}
|
||||
/**
|
||||
*@brief 蓝牙中断回调函数
|
||||
@@ -70,8 +70,8 @@ void bt_printf(const char *format, ...)
|
||||
va_end(args);
|
||||
|
||||
for (uint16_t i = 0; i < strlen(sbuf); i++) {
|
||||
while (USART_GetFlagStatus((USART_TypeDef *)uart_index[UART_8], USART_FLAG_TC) == RESET)
|
||||
while (USART_GetFlagStatus((USART_TypeDef *)uart_index[UART_7], USART_FLAG_TC) == RESET)
|
||||
;
|
||||
USART_SendData((USART_TypeDef *)uart_index[UART_8], sbuf[i]);
|
||||
USART_SendData((USART_TypeDef *)uart_index[UART_7], sbuf[i]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user