Last commit 30 Apr 2011
Revision 3:01ad25aaff55, committed 04 Feb 2011
- Comitter:
- Date:
- Fri Feb 04 18:55:44 2011 +0000
- Parent:
- 2:3b81b375ced3
- Child:
- 4:b6183c27ddfe
- Commit message:
- V1.2
Changed in this revision
--- a/YGE25i.cpp Wed Feb 02 19:53:34 2011 +0000
+++ b/YGE25i.cpp Fri Feb 04 18:55:44 2011 +0000
@@ -38,13 +38,7 @@
i2c_.frequency(200000);
adress=adress_;
//save_.attach_us(this,&YGE25i::YGESetPWMSave,1000);
- for(int a=0;a<=40;a++){
- wait_ms(10);
- YGESetPWM(0);
-
- }
- wait_ms(20);
}
char YGE25i::YGEReadReg(char reg){
@@ -103,4 +97,15 @@
void YGE25i::setPWM(int pwm_){
pwm=pwm_;
-}
\ No newline at end of file
+}
+
+void YGE25i::initYGE(void){
+
+ for(int a=0;a<=40;a++){
+
+ wait_ms(10);
+ YGESetPWM(0);
+
+ }
+ wait_ms(20);
+}
\ No newline at end of file
--- a/YGE25i.h Wed Feb 02 19:53:34 2011 +0000
+++ b/YGE25i.h Fri Feb 04 18:55:44 2011 +0000
@@ -114,6 +114,8 @@
void setPWM(int pwm_);
+ void initYGE(void);
+
};
#endif

