소스 검색

high/low level

Cyrille 11 년 전
부모
커밋
376075b378
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      emit/home_easy.c
  2. 3 0
      emit/home_easy.h

+ 2 - 2
emit/home_easy.c

@@ -211,9 +211,9 @@ int initIO()
  */
 void sendHomeEasyBit(unsigned char bit)
 {
-    digitalWrite(homeEasyPinOut, 1);
+    digitalWrite(homeEasyPinOut, HIGH_RF);
     delayMicroseconds(timings[bit][0]);
-    digitalWrite(homeEasyPinOut, 0);
+    digitalWrite(homeEasyPinOut, LOW_RF);
     delayMicroseconds(timings[bit][1]);
 }
 

+ 3 - 0
emit/home_easy.h

@@ -13,6 +13,9 @@
 #define ON 1
 #define OFF 0
 
+#define HIGH_RF 1
+#define LOW_RF 0
+
 /**
  * Encode bits with HomeEasy encoding (1 => 10, 0 => 01)
  *