| 115 | } |
| 116 | |
| 117 | static int serial_fops_ioctl(struct dfs_file *fd, int cmd, void *args) |
| 118 | { |
| 119 | rt_device_t device; |
| 120 | int flags = (int)(rt_base_t)args; |
| 121 | int mask = O_NONBLOCK | O_APPEND; |
| 122 | |
| 123 | device = (rt_device_t)fd->vnode->data; |
| 124 | switch ((rt_ubase_t)cmd) |
| 125 | { |
| 126 | case FIONREAD: |
| 127 | break; |
| 128 | case FIONWRITE: |
| 129 | break; |
| 130 | case F_SETFL: |
| 131 | flags &= mask; |
| 132 | fd->flags &= ~mask; |
| 133 | fd->flags |= flags; |
| 134 | break; |
| 135 | default: |
| 136 | break; |
| 137 | } |
| 138 | |
| 139 | return rt_device_control(device, cmd, args); |
| 140 | } |
| 141 | |
| 142 | #ifdef RT_USING_DFS_V2 |
| 143 | static ssize_t serial_fops_read(struct dfs_file *fd, void *buf, size_t count, off_t *pos) |
nothing calls this directly
no test coverage detected