21#ifdef HAS_HARDWARE_PWM
34 if (instance !=
nullptr)
41 if (instance ==
nullptr && create)
50void IrSenderPwmHard::disable() {
int8_t dutycycle_t
Type for duty cycle in percent.
uint32_t frequency_t
Type for modulation frequency in Hz.
uint16_t milliseconds_t
Type for durations in milli seconds.
uint8_t pin_t
Type for GPIO pin, compatible with Arduino libs.
void sendPwmMark(microseconds_t time)
void enablePwm(pin_t pin, frequency_t frequency, dutycycle_t dutyCycle)
Start PWM, making output active.
static Board * getInstance()
void disablePwm()
Turn off PWM.
Sending function using timer PWM.
virtual ~IrSenderPwmHard()
IrSenderPwmHard(pin_t outputPin=Board::getInstance() ->defaultPwmPin())
static IrSenderPwmHard * newInstance(pin_t ouputPin=Board::getInstance() ->defaultPwmPin())
Creates a new instance (if not existing) and returns it.
static IrSenderPwmHard * getInstance(bool create=false, pin_t ouputPin=Board::getInstance() ->defaultPwmPin())
Returns a pointer to the instance, or nullptr if not initialized.
Sending function using timer PWM.