请问如何将串口的收发缓存设置为256,也就是一次能发送256个字节。我按照教科书上面的方法试了很多次,都没有成功,只能一次发送128个字节。请高手帮助解决。多谢!
gaoyang9992006:
//==========================================================================
// 串口0初始化函数
//==========================================================================
static void FS_Uart_Init(void)
{
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE; // 2×30 don't care – see uart driver.
uartConfig.baudRate = HAL_UART_BR_115200;
uartConfig.flowControl = FALSE;
uartConfig.flowControlThreshold = 256; // 2×30 don't care – see uart driver.
uartConfig.rx.maxBufSize = 70; // 2×30 don't care – see uart driver.
uartConfig.tx.maxBufSize = 256; // 2×30 don't care – see uart driver.
uartConfig.idleTimeout = 6; // 2×30 don't care – see uart driver.
uartConfig.intEnable = TRUE; // 2×30 don't care – see uart driver.
uartConfig.callBackFunc = FS_Uart_CallBack;
HalUARTOpen (HAL_UART_PORT_0, &uartConfig);
}
wen guo2:
回复 gaoyang9992006:
按上述配置试了一下,还是不行