23 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
23 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
24 *****************************************************************************/ |
24 *****************************************************************************/ |
25 |
25 |
26 #include "thermferm.h" |
26 #include "thermferm.h" |
27 #include "xutil.h" |
27 #include "xutil.h" |
|
28 #include "delay.h" |
28 #include "rc-switch.h" |
29 #include "rc-switch.h" |
29 |
30 |
30 #ifdef HAVE_WIRINGPI_H |
31 #ifdef HAVE_WIRINGPI_H |
31 |
32 |
32 |
33 |
592 if (rcReceiverInterruptPin != -1) { |
593 if (rcReceiverInterruptPin != -1) { |
593 disableReceive(); |
594 disableReceive(); |
594 disabled_Receive = TRUE; |
595 disabled_Receive = TRUE; |
595 } |
596 } |
596 digitalWrite(rcTransmitterPin, bHighFirst ? HIGH : LOW); |
597 digitalWrite(rcTransmitterPin, bHighFirst ? HIGH : LOW); |
597 delayMicroseconds( rcPulseLength * nFirstPulses); |
598 uDelay(rcPulseLength * nFirstPulses); |
|
599 // delayMicroseconds( rcPulseLength * nFirstPulses); |
598 digitalWrite(rcTransmitterPin, bHighFirst ? LOW : HIGH); |
600 digitalWrite(rcTransmitterPin, bHighFirst ? LOW : HIGH); |
599 delayMicroseconds( rcPulseLength * nSecondPulses); |
601 uDelay(rcPulseLength * nSecondPulses); |
|
602 // delayMicroseconds( rcPulseLength * nSecondPulses); |
600 |
603 |
601 if (disabled_Receive) { |
604 if (disabled_Receive) { |
602 enableReceiveIRQ(nReceiverInterrupt_backup); |
605 enableReceiveIRQ(nReceiverInterrupt_backup); |
603 } |
606 } |
604 } |
607 } |