Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
Static Public Member Functions | Protected 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]

Static Public Member Functions

static unsigned int getDutyCycle ()
 
static IrSenderPwmgetInstance (bool create=false, pin_t outputPin=Board::getInstance() ->defaultPwmPin())
 Returns a pointer to the instance, or nullptr if not initialized. More...
 
static IrSenderPwmnewInstance (pin_t outputPin)
 Creates a new instance (if not existing) and returns it. More...
 
static void deleteInstance ()
 

Protected Member Functions

 IrSenderPwm (pin_t sendPin)
 
virtual ~IrSenderPwm ()
 
- Protected Member Functions inherited from IrSender
void writeHigh ()
 
void writeLow ()
 
 IrSender (pin_t pin)
 
virtual void enable (frequency_t frequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)=0
 
virtual void sendSpace (microseconds_t time)
 
virtual void sendMark (microseconds_t time)=0
 

Additional Inherited Members

- Public Member Functions inherited from IrSender
pin_t getPin () const
 
virtual ~IrSender ()
 
virtual void send (const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)
 Sends an IrSequence with the prescribed frequency. More...
 
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...
 
void mute ()
 Force output pin inactive. More...
 
- Static Protected Member Functions inherited from IrSender
static void barfForInvalidPin (pin_t sendPin __attribute__((unused)))
 

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 29 of file IrSenderPwm.h.

Constructor & Destructor Documentation

◆ IrSenderPwm()

IrSenderPwm::IrSenderPwm ( pin_t  sendPin)
protected

Definition at line 28 of file IrSenderPwm.cpp.

◆ ~IrSenderPwm()

virtual IrSenderPwm::~IrSenderPwm ( )
inlineprotectedvirtual

Definition at line 36 of file IrSenderPwm.h.

Member Function Documentation

◆ deleteInstance()

void IrSenderPwm::deleteInstance ( )
static

Definition at line 49 of file IrSenderPwm.cpp.

◆ getDutyCycle()

static unsigned int IrSenderPwm::getDutyCycle ( )
inlinestatic

Definition at line 39 of file IrSenderPwm.h.

◆ getInstance()

IrSenderPwm * IrSenderPwm::getInstance ( bool  create = false,
pin_t  outputPin = Board::getInstance()->defaultPwmPin() 
)
static

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

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

Definition at line 43 of file IrSenderPwm.cpp.

◆ newInstance()

IrSenderPwm * IrSenderPwm::newInstance ( pin_t  outputPin)
static

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

Returns nullptr if an instance already exists.

Definition at line 31 of file IrSenderPwm.cpp.


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