Infrared4Arduino
IrSenderNonMod.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2015 Bengt Martensson.
3 
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at
7 your option) any later version.
8 
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see http://www.gnu.org/licenses/.
16 */
17 
18 #pragma once
19 
20 #include <Arduino.h>
21 #include "InfraredTypes.h"
22 #include "IrSender.h"
23 
27 class IrSenderNonMod : public IrSender {
28 public:
29  IrSenderNonMod(pin_t pin);
30 
36  void send(const IrSequence& irSequence, frequency_t frequency = IrSignal::defaultFrequency) {
37  if (frequency == 0U)
38  sendNonModulated(irSequence);
39  }
40 
45  void sendNonModulated(const IrSequence& irSequence);
46 };
static const frequency_t defaultFrequency
Definition: IrSignal.h:12
uint32_t frequency_t
Type for modulation frequency in Hz.
Definition: InfraredTypes.h:32
uint8_t pin_t
Type for GPIO pin, compatible with Arduino libs.
Definition: InfraredTypes.h:37
void send(const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency)
Two parameter form just to be compatible with the super class.
void sendNonModulated(const IrSequence &irSequence)
Sends the IrSequence as argument.
IrSender implementation without modulation.
Abstract base class for all sending classes.
Definition: IrSender.h:26
This class consists of a vector of durations.
Definition: IrSequence.h:11
This file defines some general data types that are used in the library.
IrSenderNonMod(pin_t pin)