Infrared4Arduino
Rc5Renderer.h
Go to the documentation of this file.
1 #ifndef RC5RENDERER_H
2 #define RC5RENDERER_H
3 
4 #include "IrSignal.h"
10 class Rc5Renderer {
11 private:
12  static const frequency_t frequency = 36000U;
13  static const size_t introLength = 0U;
14  static const size_t endingLength = 0U;
15 
16 public:
24  static const IrSignal *newIrSignal(unsigned int D, unsigned int F, unsigned int T);
25 
33  static const IrSignal *newIrSignal(unsigned int D, unsigned int F);
34 
35 private:
36  Rc5Renderer();
37  static const microseconds_t timebase = 889;
38  static void emit(unsigned int t, unsigned int& index, int& pending, microseconds_t *repeat);
39  static void emitMsb(unsigned int x, unsigned int length, unsigned int& index,
40  int& pending, microseconds_t *repeat);
41  static void emitEnd(unsigned int& index, int& pending, microseconds_t *repeat);
42 
43  static uint8_t T;
44 };
45 
46 #endif /* RC5RENDERER_H */
47 
A static class consisting of two functions that generate IrSignal-s from the RC5 protocol parameters...
Definition: Rc5Renderer.h:10
static const IrSignal * newIrSignal(unsigned int D, unsigned int F, unsigned int T)
Generates an RC5 signal from the RC5 parameters.
Definition: Rc5Renderer.cpp:16
uint16_t microseconds_t
Type for durations in micro seconds.
Definition: InfraredTypes.h:16
This class models an IR signal with intro-, repeat-, and ending sequences.
Definition: IrSignal.h:11
uint16_t frequency_t
Type for modulation frequency in Hz.
Definition: InfraredTypes.h:33