MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / serial_fops_flush

Function serial_fops_flush

components/drivers/serial/dev_serial_v2.c:214–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214static int serial_fops_flush(struct dfs_file *fd)
215{
216 rt_device_t device;
217 device = (rt_device_t)fd->vnode->data;
218 RT_ASSERT(device != RT_NULL);
219
220 rt_device_control(device, RT_SERIAL_CTRL_TX_FLUSH, (void *)RT_NULL);
221 rt_device_control(device, RT_SERIAL_CTRL_RX_FLUSH, (void *)RT_NULL);
222
223 return 0;
224}
225
226static int serial_fops_poll(struct dfs_file *fd, struct rt_pollreq *req)
227{

Callers

nothing calls this directly

Calls 1

rt_device_controlFunction · 0.85

Tested by

no test coverage detected