library for implementing ir transmission
Diff: XMIT_IR.h
- Revision:
- 5:ad52a062d494
- Parent:
- 4:55946953c6e3
- Child:
- 6:281167565d6d
--- a/XMIT_IR.h Sat Oct 06 12:52:28 2012 +0000 +++ b/XMIT_IR.h Sat Oct 06 14:40:38 2012 +0000 @@ -11,12 +11,13 @@ class IRTransmitter { public: - IRTransmitter(PinName TX, PinName PWM, PinName RX, int data_buff_len, void (*fptr)(void)); + IRTransmitter(PinName TX, PinName PWM, PinName RX, int data_buff_len, void (*fptr_isr_rx)(void), void (*fptr_isr_tx)(void)); ~IRTransmitter(); void MakePacket(char* data,int len); char ReadPacket(char* data, int len); void isr_uartrx(void); - void isr(char data); + void isr_rx(char data); + void isr_tx(); void set_debug_port(Serial* port); private: @@ -24,7 +25,9 @@ void update_packet_buffer(char new_data, int data_len); public: - Mail<char,64> ir_data_mailbox; + Mail<char,32> ir_rxdata_mailbox; + Mail<char,32> ir_txdata_mailbox; + Serial* debug_port; private: