MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / transmit

Method transmit

Arduino/libraries/RCSwitch/RCSwitch.cpp:473–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void RCSwitch::transmit(int nHighPulses, int nLowPulses) {
474 #if not defined ( RCSwitchDisableReceiving )
475 boolean disabled_Receive = false;
476 int nReceiverInterrupt_backup = nReceiverInterrupt;
477 #endif
478 if (this->nTransmitterPin != -1) {
479 #if not defined( RCSwitchDisableReceiving )
480 if (this->nReceiverInterrupt != -1) {
481 this->disableReceive();
482 disabled_Receive = true;
483 }
484 #endif
485 digitalWrite(this->nTransmitterPin, HIGH);
486 delayMicroseconds( this->nPulseLength * nHighPulses);
487 digitalWrite(this->nTransmitterPin, LOW);
488 delayMicroseconds( this->nPulseLength * nLowPulses);
489
490 #if not defined( RCSwitchDisableReceiving )
491 if(disabled_Receive){
492 this->enableReceive(nReceiverInterrupt_backup);
493 }
494 #endif
495 }
496}
497/**
498 * Sends a "0" Bit
499 * _

Callers 6

send0Method · 0.95
send1Method · 0.95
sendT0Method · 0.95
sendT1Method · 0.95
sendTFMethod · 0.95
sendSyncMethod · 0.95

Calls 2

disableReceiveMethod · 0.95
enableReceiveMethod · 0.95

Tested by

no test coverage detected