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