David Joo / Mbed 2 deprecated mbed_IRBlaster

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IR_Blaster.h Source File

IR_Blaster.h

00001 /**
00002  * IR Blaster driver
00003  * 
00004  * please see Dream-IV User manual for more detail information.
00005  *
00006  ****/
00007 
00008 /*
00009  * UART Packet Structure
00010     
00011     ------------------------------------------------
00012     | SOP | Payload Size | Command | Payload | EOP |
00013     | (1) |     (1)      |   (1)   | (0~128) | (1) |
00014     ------------------------------------------------
00015 */
00016  
00017 #define SOP 0xFE   //start of frame
00018 #define EOP 0xEF   //end of frame
00019  
00020 #define COMMAND_GET_VERSION     0x00
00021 #define COMMAND_START_IROUT     0x01
00022 #define COMMAND_STOP_IROUT      0x02
00023 
00024 // Response Command = 0x80 | Command
00025 /*  -----------------------------------------------------------
00026     | SOP | Payload Size | 0x80 | Command | Payload   |   EOP |
00027     | 0xFE|     1byte    |   (1)          | (reponse) |  0xEF |
00028     -----------------------------------------------------------
00029 */
00030 
00031 #define RSP_ACK     0x00
00032 #define RSP_INVALID_PACKET      0x10
00033 #define RSP_INVALID_COMMAND     0x10
00034 #define RSP_INVALID_FORMATID    0x10
00035 
00036 // Format Types
00037 #define NEC         0x01
00038 #define NEC_SR      0x02  //NEC simple repeate
00039 #define TOSHIBA     0x03
00040 #define TOSHIBA_SR  0x04 // Toshiba simple repeate
00041 #define PHILIPS_RC5 0x05
00042 #define SONY_12BITS 0x06
00043 #define SONY_15BITS 0x07
00044 #define SONY_20BITS 0x08
00045 #define MISUBISHI   0x09
00046 #define JVC         0x0A
00047 
00048 
00049 
00050 
00051 
00052