Main Page Data Structures File List Data Fields Globals Related Pages

# remote.h

Go to the documentation of this file.

    00001 #ifndef REMOTE_H
    00002 #define REMOTE_H
    00003
    00004
    00006 #define  RC_DMACHANNEL   1
    00007
    00008
    00010 #define  TICKS_PER_uS    5
    00011
    00012
    00014 #define  RC_QUEUE_SIZE   16
    00015
    00016
    00025 #define  RC_TRESHOLD   10
    00026
    00027
    00028 /*
    00029  * Keycode constants
    00030  *
    00031  * All received keycodes are decoded into 32bit long integers,
    00032  * consisting of one key-repeat bit, 4 bits for the detected
    00033  * protocol type and 27 bits for the keycode itself.
    00034  *
    00035  * Bit    31:  key repeat bit
    00036  * Bit 30-27:  IR protocol
    00037  * Bit  26-0:  key code
    00038  */
    00039 #define  RCKEY_REPEAT    0x80000000
    00040 #define  RCKEY_PROTO     0x78000000
    00041 #define  RCKEY_CODE      0x07FFFFFF
    00042
    00043 #define  RCKEY_NONE      0x00000000
    00044 #define  RCKEY_RC5       0x08000000
    00045 #define  RCKEY_NEC       0x10000000
    00046 #define  RCKEY_SONY      0x18000000
    00047 #define  RCKEY_RECS80    0x20000000
    00048 #define  RCKEY_DENON     0x28000000
    00049 #define  RCKEY_MOTOROLA  0x30000000
    00050 #define  RCKEY_JAPAN     0x38000000
    00051 #define  RCKEY_SAMSUNG   0x40000000
    00052 #define  RCKEY_DAEWOO    0x48000000
    00053
    00054
    00055 // RC5 decoder settings
    00056 //
    00057 #define  RC5_SHORT       889
    00058 #define  RC5_LONG        (RC5_SHORT * 2)
    00059 #define  RC5_MARGIN      (RC5_SHORT / 2)
    00060
    00061 // NEC decoder settings
    00062 //
    00063 #define  NEC_PULSE       560
    00064 #define  NEC_START1      (NEC_PULSE * 16)
    00065 #define  NEC_START2      (NEC_PULSE * 8)
    00066 #define  NEC_REPEAT      (NEC_PULSE * 4)
    00067 #define  NEC_PAUSE0      (NEC_PULSE * 1)
    00068 #define  NEC_PAUSE1      (NEC_PULSE * 3)
    00069 #define  NEC_MARGIN      (NEC_PULSE / 2)
    00070
    00071 // SAMSUNG decoder settings
    00072 //
    00073 #define  SAM_PULSE       560
    00074 #define  SAM_START1      (SAM_PULSE * 8)
    00075 #define  SAM_START2      (SAM_PULSE * 8)
    00076 #define  SAM_PAUSE0      (SAM_PULSE * 1)
    00077 #define  SAM_PAUSE1      (SAM_PULSE * 3)
    00078 #define  SAM_MARGIN      (SAM_PULSE / 2)
    00079 #define  SAM_REPEATMS    120
    00080
    00081 extern  int            RC_KeyAvail();
    00082 extern  unsigned long  RC_GetKey();
    00083
    00084 extern  void           RC_Init();
    00085 extern  void           RC_Done();
    00086
    00087 #endif