diff options
| author | tangweikang <[email protected]> | 2019-08-14 08:56:48 +0800 |
|---|---|---|
| committer | tangweikang <[email protected]> | 2019-08-15 16:44:05 +0800 |
| commit | e1587de6f77936a6795fc0d4042fb641e00ecba8 (patch) | |
| tree | d385489dc6d12d428ff1bdbb770a834ddb98046d /components/drivers/include | |
| parent | 473505053feebb4eb1e2e870d5e042776556d24c (diff) | |
[components][drivers] update capture driven framework
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/rt_capture.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/components/drivers/include/drivers/rt_capture.h b/components/drivers/include/drivers/rt_capture.h index efc2ae4db1..fe72997b43 100644 --- a/components/drivers/include/drivers/rt_capture.h +++ b/components/drivers/include/drivers/rt_capture.h @@ -22,19 +22,19 @@ extern "C" { #define CAPTURE_CMD_CLEAR_BUF (128 + 0) /* clear capture buf */ #define CAPTURE_CMD_SET_WATERMARK (128 + 1) /* Set the callback threshold */ -struct capture_data_struct +struct capture_data { - rt_bool_t is_high; rt_uint32_t pulsewidth_us; + rt_bool_t is_high; }; struct rt_capture_device { - struct rt_device parent; + struct rt_device parent; - const struct rt_capture_ops *ops; - struct rt_ringbuffer *ringbuff; - rt_size_t watermark; + const struct rt_capture_ops *ops; + struct rt_ringbuffer *ringbuff; + rt_size_t watermark; }; /** @@ -50,10 +50,9 @@ struct rt_capture_ops void rt_hw_capture_isr(struct rt_capture_device *capture, rt_bool_t level); -rt_err_t rt_hw_capture_register(struct rt_capture_device *capture, - const char *name, - rt_uint32_t flag, - void *data); +rt_err_t rt_device_capture_register(struct rt_capture_device *capture, + const char *name, + void *data); #ifdef __cplusplus } #endif |
