Infrared4Arduino
Rc5Renderer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "IrSignal.h"
9 class Rc5Renderer {
10 private:
11  static const frequency_t frequency = 36000U;
12  static const size_t introLength = 0U;
13  static const size_t endingLength = 0U;
14 
15 public:
23  static const IrSignal *newIrSignal(unsigned int D, unsigned int F, unsigned int T);
24 
32  static const IrSignal *newIrSignal(unsigned int D, unsigned int F);
33 
34 private:
35  Rc5Renderer();
36  static const microseconds_t timebase = 889;
37  static void emit(unsigned int t, unsigned int& index, int& pending, microseconds_t *repeat);
38  static void emitMsb(unsigned int x, unsigned int length, unsigned int& index,
39  int& pending, microseconds_t *repeat);
40  static void emitEnd(unsigned int& index, int& pending, microseconds_t *repeat);
41 
42  static uint8_t T;
43 };
A static class consisting of two functions that generate IrSignal-s from the RC5 protocol parameters.
Definition: Rc5Renderer.h:9
static const IrSignal * newIrSignal(unsigned int D, unsigned int F, unsigned int T)
Generates an RC5 signal from the RC5 parameters.
Definition: Rc5Renderer.cpp:18
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:32
This class models an IR signal with intro-, repeat-, and ending sequences.
Definition: IrSignal.h:10