Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
Nec1Renderer.h
Go to the documentation of this file.
1#pragma once
2
3#include <IrSignal.h>
4
11private:
12 static constexpr frequency_t frequency = 38400UL;
13 static constexpr dutycycle_t dutyCycle = 33U;
14 static constexpr size_t introLength = 68U;
15 static constexpr size_t repeatLength = 4U;
16
17public:
18
27 static const IrSignal *newIrSignal(unsigned int D, unsigned int S, unsigned int F);
28
36 static const IrSignal *newIrSignal(unsigned int D, unsigned int F) {
37 return newIrSignal(D, 255-D, F);
38 };
39
40private:
42 static void lsbByte(microseconds_t *intro, unsigned int& i, uint32_t& sum, unsigned int D);
43 static void transmitBit(microseconds_t *intro, unsigned int& i, uint32_t& sum, unsigned int data);
44};
int8_t dutycycle_t
Type for duty cycle in percent.
Definition: InfraredTypes.h:36
uint16_t microseconds_t
Type for durations in micro seconds.
Definition: InfraredTypes.h:15
uint32_t frequency_t
Type for modulation frequency in Hz.
Definition: InfraredTypes.h:31
This class models an IR signal with intro-, repeat-, and ending sequences.
Definition: IrSignal.h:11
A static class consisting of two functions that generate IrSignal-s from the NEC1 protocol parameters...
Definition: Nec1Renderer.h:10
static const IrSignal * newIrSignal(unsigned int D, unsigned int S, unsigned int F)
Generates am IrSignal from the NEC1 parameters.
Definition: Nec1Renderer.cpp:9
static const IrSignal * newIrSignal(unsigned int D, unsigned int F)
Generates am IrSignal from the NEC1 parameters.
Definition: Nec1Renderer.h:36