[pwm] 优化pwm框架 (#5857)

This commit is contained in:
Man, Jianting (Meco) 2022-04-22 10:31:29 -04:00 committed by GitHub
parent acc04facf9
commit 2c6a279ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -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 */