summaryrefslogtreecommitdiff
path: root/components/drivers/misc
diff options
context:
space:
mode:
authorguo <[email protected]>2021-09-28 10:36:54 +0800
committerGitHub <[email protected]>2021-09-28 10:36:54 +0800
commit55a302cd092758a44b589d65470a69d9e8ae4ced (patch)
treee60fc53994c426007e9eb4877e5bd123f124ef39 /components/drivers/misc
parent00727d6b6db92dc1cf98f028f26fd6168594b905 (diff)
parent00d42ef73cff61ecda7ff006b077a73e1a4ff669 (diff)
Merge branch 'master' into usbh_construct
Diffstat (limited to 'components/drivers/misc')
-rw-r--r--components/drivers/misc/adc.c6
-rw-r--r--components/drivers/misc/dac.c8
-rw-r--r--components/drivers/misc/pin.c10
-rw-r--r--components/drivers/misc/pulse_encoder.c2
-rw-r--r--components/drivers/misc/rt_drv_pwm.c6
-rw-r--r--components/drivers/misc/rt_inputcapture.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c
index 2d26beb243..a73fcc54e3 100644
--- a/components/drivers/misc/adc.c
+++ b/components/drivers/misc/adc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -144,7 +144,7 @@ rt_err_t rt_adc_disable(rt_adc_device_t dev, rt_uint32_t channel)
return result;
}
-#ifdef FINSH_USING_MSH
+#ifdef RT_USING_FINSH
static int adc(int argc, char **argv)
{
@@ -232,4 +232,4 @@ static int adc(int argc, char **argv)
}
MSH_CMD_EXPORT(adc, adc function);
-#endif /* FINSH_USING_MSH */
+#endif /* RT_USING_FINSH */
diff --git a/components/drivers/misc/dac.c b/components/drivers/misc/dac.c
index 336c78d018..45b90d2106 100644
--- a/components/drivers/misc/dac.c
+++ b/components/drivers/misc/dac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -141,14 +141,14 @@ rt_err_t rt_dac_disabled(rt_dac_device_t dev, rt_uint32_t channel)
return result;
}
-#ifdef FINSH_USING_MSH
+#ifdef RT_USING_FINSH
static int dac(int argc, char **argv)
{
int result = RT_EOK;
static rt_dac_device_t dac_device = RT_NULL;
char *result_str;
-
+
if (argc > 1)
{
if (!strcmp(argv[1], "probe"))
@@ -228,4 +228,4 @@ static int dac(int argc, char **argv)
}
MSH_CMD_EXPORT(dac, dac function);
-#endif /* FINSH_USING_MSH */
+#endif /* RT_USING_FINSH */
diff --git a/components/drivers/misc/pin.c b/components/drivers/misc/pin.c
index 6f27fe516d..666d221fa6 100644
--- a/components/drivers/misc/pin.c
+++ b/components/drivers/misc/pin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -47,7 +47,7 @@ static rt_size_t _pin_write(rt_device_t dev, rt_off_t pos, const void *buffer, r
return size;
}
-static rt_err_t _pin_control(rt_device_t dev, int cmd, void *args)
+static rt_err_t _pin_control(rt_device_t dev, int cmd, void *args)
{
struct rt_device_pin_mode *mode;
struct rt_device_pin *pin = (struct rt_device_pin *)dev;
@@ -111,6 +111,7 @@ rt_err_t rt_pin_attach_irq(rt_int32_t pin, rt_uint32_t mode,
}
return -RT_ENOSYS;
}
+
rt_err_t rt_pin_detach_irq(rt_int32_t pin)
{
RT_ASSERT(_hw_pin.ops != RT_NULL);
@@ -146,7 +147,7 @@ void rt_pin_write(rt_base_t pin, rt_base_t value)
}
FINSH_FUNCTION_EXPORT_ALIAS(rt_pin_write, pinWrite, write value to hardware pin);
-int rt_pin_read(rt_base_t pin)
+int rt_pin_read(rt_base_t pin)
{
RT_ASSERT(_hw_pin.ops != RT_NULL);
return _hw_pin.ops->pin_read(&_hw_pin.parent, pin);
@@ -157,7 +158,7 @@ rt_base_t rt_pin_get(const char *name)
{
RT_ASSERT(_hw_pin.ops != RT_NULL);
RT_ASSERT(name[0] == 'P');
-
+
if(_hw_pin.ops->pin_get == RT_NULL)
{
return -RT_ENOSYS;
@@ -166,4 +167,3 @@ rt_base_t rt_pin_get(const char *name)
return _hw_pin.ops->pin_get(name);
}
FINSH_FUNCTION_EXPORT_ALIAS(rt_pin_get, pinGet, get pin number from hardware pin);
-
diff --git a/components/drivers/misc/pulse_encoder.c b/components/drivers/misc/pulse_encoder.c
index 3145c24675..5afb12664a 100644
--- a/components/drivers/misc/pulse_encoder.c
+++ b/components/drivers/misc/pulse_encoder.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/misc/rt_drv_pwm.c b/components/drivers/misc/rt_drv_pwm.c
index 572580c45c..04895868e2 100644
--- a/components/drivers/misc/rt_drv_pwm.c
+++ b/components/drivers/misc/rt_drv_pwm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -198,7 +198,7 @@ rt_err_t rt_pwm_get(struct rt_device_pwm *device, struct rt_pwm_configuration *c
FINSH_FUNCTION_EXPORT_ALIAS(rt_pwm_enable, pwm_enable, enable pwm by channel.);
FINSH_FUNCTION_EXPORT_ALIAS(rt_pwm_set, pwm_set, set pwm.);
-#ifdef FINSH_USING_MSH
+#ifdef RT_USING_FINSH
static int pwm_enable(int argc, char **argv)
{
int result = 0;
@@ -323,5 +323,5 @@ _exit:
}
MSH_CMD_EXPORT(pwm_get, pwm_get <pwm_dev> <channel>);
-#endif /* FINSH_USING_MSH */
+#endif /* RT_USING_FINSH */
#endif /* RT_USING_FINSH */
diff --git a/components/drivers/misc/rt_inputcapture.c b/components/drivers/misc/rt_inputcapture.c
index d1886186d7..134bbcee96 100644
--- a/components/drivers/misc/rt_inputcapture.c
+++ b/components/drivers/misc/rt_inputcapture.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*