# serial.flush ## 功能 刷新已打开串口的输出缓冲。 ## 语法 ```bt device.open(config).flush() ``` ## 参数 无参数。 ## 返回值 | 类型 | 说明 | | ------ | ------ | | Bool | 刷新成功返回 true。 | ## 示例 ```bt port = device.open({type: 'serial', port: 'COM3'}) result = port.flush() // 输出:true print result ``` ## 注意事项 - 失败时抛出底层设备错误。