mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 04:04:15 +08:00
[rt_drv_pwm]完善PWM框架互补输出部分代码 (#6338)
* [pwm]Improve the code * 将与bsp无关的代码移植到框架部分 * 添加注释
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -383,12 +383,8 @@ static rt_err_t drv_pwm_control(struct rt_device_pwm *device, int cmd, void *arg
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case PWMN_CMD_ENABLE:
|
||||
configuration->complementary = RT_TRUE;
|
||||
case PWM_CMD_ENABLE:
|
||||
return drv_pwm_enable(htim, configuration, RT_TRUE);
|
||||
case PWMN_CMD_DISABLE:
|
||||
configuration->complementary = RT_FALSE;
|
||||
case PWM_CMD_DISABLE:
|
||||
return drv_pwm_enable(htim, configuration, RT_FALSE);
|
||||
case PWM_CMD_SET:
|
||||
|
||||
Reference in New Issue
Block a user