Infrared4Arduino  1.0.6
Public Member Functions | Static Public Member Functions | List of all members
IrSenderPwm Class Reference

Sending function using timer PWM. More...

#include <IrSenderPwm.h>

Inheritance diagram for IrSenderPwm:
Inheritance graph
[legend]
Collaboration diagram for IrSenderPwm:
Collaboration graph
[legend]

Public Member Functions

void send (const IrSequence &sequence, frequency_t frequency=IrSignal::defaultFrequency)
 Sends an IrSequence with the prescribed frequency. More...
 
- Public Member Functions inherited from IrSender
virtual ~IrSender ()
 
void sendIrSignal (const IrSignal &irSignal, unsigned int noSends=1)
 Sends the IrSignal given as argument the prescribed number of times. More...
 
void sendWhile (const IrSignal &irSignal, bool(*trigger)())
 Send an IrSignal, when and as long as trigger() returns true. More...
 
virtual void mute ()
 Send an IrSignal, when and as long as buttonPin is LOW. More...
 

Static Public Member Functions

static IrSenderPwmgetInstance (bool create=false)
 Returns a pointer to the instance, or NULL if not initialized. More...
 
static IrSenderPwmnewInstance ()
 Creates a new instance (if not existing) and returns it. More...
 
static void deleteInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from IrSender
pin_t getOutputPin () const
 
void delayUSecs (microseconds_t T)
 
 IrSender ()
 
 IrSender (pin_t pin)
 

Detailed Description

Sending function using timer PWM.

Due to the nature of the timers, this is a Highlander, ("There can only be one"), so the class is a singleton class, with private constructor, a factory method that enforces the "highlander property".

Definition at line 28 of file IrSenderPwm.h.

Member Function Documentation

◆ deleteInstance()

static void IrSenderPwm::deleteInstance ( )
inlinestatic

Definition at line 48 of file IrSenderPwm.h.

◆ getInstance()

IrSenderPwm * IrSenderPwm::getInstance ( bool  create = false)
static

Returns a pointer to the instance, or NULL if not initialized.

If argument true, in the latter case creates a new instance and returns it.

Definition at line 48 of file IrSenderPwm.cpp.

◆ newInstance()

IrSenderPwm * IrSenderPwm::newInstance ( )
static

Creates a new instance (if not existing) and returns it.

Returns NULL if an instance already exists.

Definition at line 41 of file IrSenderPwm.cpp.

◆ send()

void IrSenderPwm::send ( const IrSequence irSequence,
frequency_t  frequency = IrSignal::defaultFrequency 
)
virtual

Sends an IrSequence with the prescribed frequency.

Parameters
irSequence
frequencyfrequency in Hz

Implements IrSender.

Definition at line 27 of file IrSenderPwm.cpp.


The documentation for this class was generated from the following files: