summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMan, Jianting (Meco) <[email protected]>2022-04-22 10:31:29 -0400
committerGitHub <[email protected]>2022-04-22 22:31:29 +0800
commit2c6a279ac3e211fdf104c7bf68056712690aaaf7 (patch)
treefbb61320e4ed14405bd387a66894620a1030acb7 /components
parentacc04facf9739b8a9523c501268e3a4cbeb74788 (diff)
[pwm] 优化pwm框架 (#5857)
Diffstat (limited to 'components')
-rw-r--r--components/drivers/misc/rt_drv_pwm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/components/drivers/misc/rt_drv_pwm.c b/components/drivers/misc/rt_drv_pwm.c
index 9016b5ce5f..20bac08b82 100644
--- a/components/drivers/misc/rt_drv_pwm.c
+++ b/components/drivers/misc/rt_drv_pwm.c
@@ -8,9 +8,6 @@
* 2018-05-07 aozima the first version
*/
-#include <string.h>
-#include <stdlib.h>
-
#include <drivers/rt_drv_pwm.h>
static rt_err_t _pwm_control(rt_device_t dev, int cmd, void *args)
@@ -194,12 +191,9 @@ rt_err_t rt_pwm_get(struct rt_device_pwm *device, struct rt_pwm_configuration *c
}
#ifdef RT_USING_FINSH
+#include <stdlib.h>
#include <finsh.h>
-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 RT_USING_FINSH
static int pwm_enable(int argc, char **argv)
{
int result = 0;
@@ -325,4 +319,3 @@ _exit:
MSH_CMD_EXPORT(pwm_get, pwm_get <pwm_dev> <channel>);
#endif /* RT_USING_FINSH */
-#endif /* RT_USING_FINSH */