32 for (
unsigned int i = 0; i < irSignal.
noRepetitions(noSends); i++)
58 enable(frequency, dutyCycle);
59#ifdef CONSIDER_COMPUTATIONAL_DELAYS
60 uint32_t refTime = micros();
62 for (
unsigned int i = 0U; i < irSequence.
getLength(); i++) {
63#ifdef CONSIDER_COMPUTATIONAL_DELAYS
67 int32_t delay = refTime - micros();
int8_t dutycycle_t
Type for duty cycle in percent.
uint16_t microseconds_t
Type for durations in micro seconds.
uint32_t frequency_t
Type for modulation frequency in Hz.
uint8_t pin_t
Type for GPIO pin, compatible with Arduino libs.
static Board * getInstance()
void setPinMode(pin_t pin, PinMode mode)
virtual void sendMark(microseconds_t time)=0
virtual void send(const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)
Sends an IrSequence with the prescribed frequency.
virtual void enable(frequency_t frequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)=0
virtual void sendSpace(microseconds_t time)
void sendIrSignal(const IrSignal &irSignal, unsigned int noSends=1)
Sends the IrSignal given as argument the prescribed number of times.
void mute()
Force output pin inactive.
void sendWhile(const IrSignal &irSignal, bool(*trigger)())
Send an IrSignal, when and as long as trigger() returns true.
This class consists of a vector of durations.
size_t getLength() const
Returns the number of durations.
This class models an IR signal with intro-, repeat-, and ending sequences.
frequency_t getFrequency() const
const IrSequence & getIntro() const
const IrSequence & getRepeat() const
unsigned int noRepetitions(unsigned int noSends) const
Implementation of the count semantics, i.e., how many repetitions should be sent if the signal is sen...
const IrSequence & getEnding() const