First Commit IR remote class This class constructer needs (PwmOutPin,DigitalInPin,data array pointer,data array length,Serial instance pointer)

Committer:
lelect
Date:
Sun Apr 06 09:12:22 2014 +0000
Revision:
0:fc05497b2a23
IRremote class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lelect 0:fc05497b2a23 1 #ifndef MBED_IRREMOTE_H
lelect 0:fc05497b2a23 2 #define MBED_IRREMOTE_H
lelect 0:fc05497b2a23 3 #include "mbed.h"
lelect 0:fc05497b2a23 4 #include "debug.h"
lelect 0:fc05497b2a23 5
lelect 0:fc05497b2a23 6 class IRremote
lelect 0:fc05497b2a23 7 {
lelect 0:fc05497b2a23 8 public:
lelect 0:fc05497b2a23 9 IRremote(PinName trans,PinName receive,int* point,int length,Serial* device);
lelect 0:fc05497b2a23 10 void setArray(int* point,int length);
lelect 0:fc05497b2a23 11 void showArray();
lelect 0:fc05497b2a23 12 int sum();
lelect 0:fc05497b2a23 13 float average();
lelect 0:fc05497b2a23 14 int datalength();
lelect 0:fc05497b2a23 15 void trans(void (*afunc)(void),void (*bfunc)(void));
lelect 0:fc05497b2a23 16 void receive(void (*afunc)(void),void (*bfunc)(void));
lelect 0:fc05497b2a23 17 protected:
lelect 0:fc05497b2a23 18 void init();
lelect 0:fc05497b2a23 19 int* _point;
lelect 0:fc05497b2a23 20 int _length;
lelect 0:fc05497b2a23 21 int _sum;
lelect 0:fc05497b2a23 22 float _ave;
lelect 0:fc05497b2a23 23 PwmOut _trans;
lelect 0:fc05497b2a23 24 DigitalIn _receive;
lelect 0:fc05497b2a23 25 Timer _timer;
lelect 0:fc05497b2a23 26 Serial* _device;
lelect 0:fc05497b2a23 27 struct {
lelect 0:fc05497b2a23 28 unsigned lastStatus : 1;
lelect 0:fc05497b2a23 29 } flag;
lelect 0:fc05497b2a23 30 };
lelect 0:fc05497b2a23 31
lelect 0:fc05497b2a23 32 #endif