Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
IO_pwm.h
00001 /* 00002 h文件 00003 class 类名 00004 { 00005 public: 00006 类名::构造函数(变量参数); 00007 公有函数声明; 00008 protected: 00009 私有对象声明; 00010 私有变量声明; 00011 私有函数声明; 00012 }; 00013 */ 00014 00015 #ifndef IO_pwm_H_ 00016 #define IO_pwm_H_ 00017 #include "mbed.h" 00018 class IO_pwm 00019 { 00020 public: 00021 IO_pwm(PinName n); 00022 void pwm_io(int p_us, float dc); 00023 00024 protected: 00025 //PWM的周期=on_delay+off_delay,高电平时间=on_delay 00026 int on_delay; 00027 int off_delay; 00028 00029 PinName _n; 00030 // DigitalOutr mypwm; 00031 Timeout timer; 00032 void toggleOn(void); 00033 void toggleOff(void); 00034 }; 00035 #endif
Generated on Thu Jul 21 2022 06:43:10 by
1.7.2