library for implementing ir transmission

XMIT_IR.h

Committer:
cmulady
Date:
2012-10-06
Revision:
1:ae1d2167a10c
Parent:
0:556f9be6047d
Child:
2:2eb0a3a29b5b

File content as of revision 1:ae1d2167a10c:

#ifndef MBED_XMIT_IR_H
#define MBED_XMIT_IR_H

#include "mbed.h"
#include "rtos.h"

#define ASCII_ETX 0x03
#define ASCII_STX 0x02

class IRTransmitter
{
public:
    IRTransmitter(PinName TX, PinName PWM, PinName RX, int data_buff_len, 	void 	(*fptr)(void));
    ~IRTransmitter();
    void MakePacket(char* data,int len);
    char ReadPacket(char* data);
    void isr_uartrx(void);

public:
    Mail<char,64> ir_data_mailbox;

private:
    Serial* ir_serial;
    PwmOut* ir_pwm;
    char*   data_buffer_out;
    char*   data_buffer_in;



};





#endif