From e1587de6f77936a6795fc0d4042fb641e00ecba8 Mon Sep 17 00:00:00 2001 From: tangweikang Date: Wed, 14 Aug 2019 08:56:48 +0800 Subject: [components][drivers] update capture driven framework --- components/drivers/include/drivers/rt_capture.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'components/drivers/include') 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 -- cgit v1.3.1