library for implementing ir transmission

Committer:
cmulady
Date:
Sat Oct 06 02:45:52 2012 +0000
Revision:
2:2eb0a3a29b5b
Parent:
1:ae1d2167a10c
Child:
3:823708586b3e
bad luck, ol mum.

Who changed what in which revision?

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