Infrared remote test functions (11/26/2010)

Revision:
0:e526ff8f7602
Child:
1:d1764facee30
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Infrared.h	Fri Nov 26 18:43:44 2010 +0000
@@ -0,0 +1,51 @@
+#ifndef MBED_IR_H
+#define MBED_IR_H
+
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+class Infrared {
+public:
+
+    // these declared values will eventually be read off the SD micro card
+    
+    // format
+    int name, flags, eps, aeps;
+    
+    // Timing
+    double phead, shead, pone, sone; // values are time in us
+    double pzero, szero, ptoggle, stoggle, frequency;
+    double ptrail, plead, foot, gap;
+    double irPeriod, cycleOn, cycleOff; 
+    
+    // data
+    int postdata, toggleMask, data, code, invCode, preData, command, dutycycle, inversionMask;
+    char preDataBits, dataBits, postDataBits, repeat;
+    unsigned long int MSB;
+    
+    // commands
+    int on, off, chup, chdn, volup, voldn;
+    int one, two, three, four, five, six;
+    int seven, eight, nine, zero;
+    int up, down, left, right, mute;
+    int enter, cancel, menu, info;
+    
+    // assigns specifier to output pin
+    Infrared(PinName pin);
+
+    void header(void);
+    void strobeSpace(void);
+    void strobeRC6(void);
+    void pulse(double pulseL);
+    void sendCodeDish(unsigned long int command);
+    void sendCodeGETV(unsigned long int command);
+    void sendCodeSharpTV(unsigned long int command);
+    void convertTiming();
+    void maskBit(void);
+    void invertCode(int mask, int invertData);
+  
+private:  
+    DigitalOut irLed;
+};
+
+#endif