修改doc文件夹下pwm例程中将led的io设置为输出模式后再使用PWM控制LED,经验证使用这样是无法正常输出PWM的

This commit is contained in:
slhuan 2023-03-08 10:26:30 +08:00 committed by Man, Jianting (Meco)
parent 7c95cc98f9
commit e722733178
1 changed files with 0 additions and 5 deletions

View File

@ -218,11 +218,6 @@ static int pwm_led_sample(int argc, char *argv[])
dir = 1; /* Increase or decrease direction of PWM pulse width value */
pulse = 0; /* PWM pulse width value, the unit is nanoseconds*/
/* Set LED pin mode to output */
rt_pin_mode(LED_PIN_NUM, PIN_MODE_OUTPUT);
/* Set high LED pin mode */
rt_pin_write(LED_PIN_NUM, PIN_HIGH);
/* Search the Device */
pwm_dev = (struct rt_device_pwm *)rt_device_find(PWM_DEV_NAME);
if (pwm_dev == RT_NULL)