library for implementing ir transmission

Committer:
cmulady
Date:
Sat Oct 06 01:44:32 2012 +0000
Revision:
1:ae1d2167a10c
Parent:
0:556f9be6047d
Child:
2:2eb0a3a29b5b
doesnt work!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cmulady 0:556f9be6047d 1 #ifndef MBED_XMIT_IR_H
cmulady 0:556f9be6047d 2 #define MBED_XMIT_IR_H
cmulady 0:556f9be6047d 3
cmulady 0:556f9be6047d 4 #include "mbed.h"
cmulady 1:ae1d2167a10c 5 #include "rtos.h"
cmulady 0:556f9be6047d 6
cmulady 1:ae1d2167a10c 7 #define ASCII_ETX 0x03
cmulady 1:ae1d2167a10c 8 #define ASCII_STX 0x02
cmulady 1:ae1d2167a10c 9
cmulady 1:ae1d2167a10c 10 class IRTransmitter
cmulady 0:556f9be6047d 11 {
cmulady 0:556f9be6047d 12 public:
cmulady 1:ae1d2167a10c 13 IRTransmitter(PinName TX, PinName PWM, PinName RX, int data_buff_len, void (*fptr)(void));
cmulady 1:ae1d2167a10c 14 ~IRTransmitter();
cmulady 1:ae1d2167a10c 15 void MakePacket(char* data,int len);
cmulady 1:ae1d2167a10c 16 char ReadPacket(char* data);
cmulady 1:ae1d2167a10c 17 void isr_uartrx(void);
cmulady 1:ae1d2167a10c 18
cmulady 1:ae1d2167a10c 19 public:
cmulady 1:ae1d2167a10c 20 Mail<char,64> ir_data_mailbox;
cmulady 0:556f9be6047d 21
cmulady 1:ae1d2167a10c 22 private:
cmulady 1:ae1d2167a10c 23 Serial* ir_serial;
cmulady 1:ae1d2167a10c 24 PwmOut* ir_pwm;
cmulady 1:ae1d2167a10c 25 char* data_buffer_out;
cmulady 1:ae1d2167a10c 26 char* data_buffer_in;
cmulady 1:ae1d2167a10c 27
cmulady 1:ae1d2167a10c 28
cmulady 1:ae1d2167a10c 29
cmulady 0:556f9be6047d 30 };
cmulady 0:556f9be6047d 31
cmulady 0:556f9be6047d 32
cmulady 1:ae1d2167a10c 33
cmulady 1:ae1d2167a10c 34
cmulady 1:ae1d2167a10c 35
cmulady 0:556f9be6047d 36 #endif