可以考虑pwm模式!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您可以使用函数 void HalLedBlink (uint8 leds, uint8 numBlinks, uint8 percent, uint16 period)
这些参数分别是,操作的LED,闪烁次数,LED点亮的时间百分比以及闪烁的周期。这个函数除了可以控制LED灯闪烁的命令之外,还通过百分比和周期的设置直接控制某个IO口输出脉宽调制的波形,也就是这个函数可以用来输出PWM。