| 82 | } |
| 83 | |
| 84 | static rt_ssize_t rt_inputcapture_read(struct rt_device *dev, |
| 85 | rt_off_t pos, |
| 86 | void *buffer, |
| 87 | rt_size_t size) |
| 88 | { |
| 89 | rt_size_t receive_size; |
| 90 | struct rt_inputcapture_device *inputcapture; |
| 91 | |
| 92 | RT_ASSERT(dev != RT_NULL); |
| 93 | |
| 94 | inputcapture = (struct rt_inputcapture_device *)dev; |
| 95 | receive_size = rt_ringbuffer_get(inputcapture->ringbuff, (rt_uint8_t *)buffer, sizeof(struct rt_inputcapture_data) * size); |
| 96 | |
| 97 | return receive_size / sizeof(struct rt_inputcapture_data); |
| 98 | } |
| 99 | |
| 100 | static rt_err_t rt_inputcapture_control(struct rt_device *dev, int cmd, void *args) |
| 101 | { |
nothing calls this directly
no test coverage detected