1 #ifndef IRDA_IRLAP_H 2 #define IRDA_IRLAP_H 3 /* 4 ** $VER: irlap.h 1.0 (23.04.05) 5 ** 6 ** IrDA Link Access Protocol definitions include file 7 ** 8 ** (C) Copyright 2005 Chris Hodges 9 ** All Rights Reserved 10 */ 11 12 #if defined(__GNUC__) 13 # pragma pack(1) 14 #endif 15 16 /* LAP Address Flags */ 17 #define LAM_ADDRESS 0xfe 18 #define LAS_ADDRESS 1 19 #define LAF_COMMAND 0x01 20 #define LAF_RESPONSE 0x00 21 22 /* LAP Control Flag */ 23 #define LCF_POLLFINAL 0x10 24 #define LCF_SUPERVISORY 0x01 25 #define LCM_SUPERVISORY 0x03 26 #define LCF_UNNUMBERED 0x03 27 #define LCM_UNNUMBERED 0x03 28 #define LCF_INFO 0x00 29 #define LCM_INFO 0x01 30 31 #define LCM_NR 0xe0 32 #define LCS_NR 5 33 #define LCM_NS 0x0e 34 #define LCS_NS 1 35 36 #define UNNUMBERED_MASK 0xec /* 7 6 5 4 3 2 1 0 */ 37 #define UCMD_SNRM 0x80 /* 1 0 0 P 0 0 1 1 SNRM command */ 38 #define UCMD_DISC 0x40 /* 0 1 0 P 0 0 1 1 DISC command */ 39 #define UCMD_UI 0x00 /* 0 0 0 P 0 0 1 1 UI command */ 40 #define UCMD_XID 0x2c /* 0 0 1 P 1 1 1 1 XID command */ 41 #define UCMD_TEST 0xe0 /* 1 1 1 P 0 0 1 1 TEST command */ 42 #define URSP_RNRM 0x80 /* 1 0 0 F 0 0 1 1 RNRM response */ 43 #define URSP_UA 0x30 /* 0 1 1 F 0 0 1 1 UA response */ 44 #define URSP_FRMR 0x84 /* 1 0 0 F 0 1 1 1 FRMR response */ 45 #define URSP_DM 0x0c /* 0 0 0 F 1 1 1 1 DM response */ 46 #define URSP_RD 0x40 /* 0 1 0 F 0 0 1 1 RD response */ 47 #define URSP_UI 0x00 /* 0 0 0 F 0 0 1 1 UI response */ 48 #define URSP_XID 0xac /* 1 0 1 F 1 1 1 1 XID response */ 49 #define URSP_TEST 0xe0 /* 1 1 1 F 0 0 1 1 TEST response */ 50 51 #define SUPERVISORY_MASK 0x0c /* 7 6 5 4 3 2 1 0 */ 52 #define SCR_RR 0x00 /* Nr Nr Nr PF 0 0 0 1 RR command/response */ 53 #define SCR_RNR 0x04 /* Nr Nr Nr PF 0 1 0 1 RNR command/response */ 54 #define SCR_REJ 0x08 /* Nr Nr Nr PF 1 0 0 1 REJ command/response */ 55 #define SCR_SREJ 0x0c /* Nr Nr Nr PF 1 1 0 1 SREJ command/response */ 56 57 /* negotiation parameters */ 58 59 #define PI_BAUDRATE 0x01 /* Supported baudrates (1/2 bytes) */ 60 #define PI_MAXTURNAROUND 0x82 /* Maximum Turnaround time */ 61 #define PI_DATASIZE 0x83 /* Maximum frame size */ 62 #define PI_WINDOWSIZE 0x84 /* Maximum window size */ 63 #define PI_ADDBOFS 0x85 /* Number of additional BOFs at 115200bps */ 64 #define PI_MINTURNAROUND 0x86 /* Minimum turnaround time */ 65 #define PI_LINKDCTHRESH 0x08 /* Link disconnect/threshold time */ 66 67 /* baudrates */ 68 #define BRF_2400 0x0001 69 #define BRF_9600 0x0002 70 #define BRF_19200 0x0004 71 #define BRF_38400 0x0008 72 #define BRF_57600 0x0010 73 #define BRF_115200 0x0020 74 #define BRF_576000 0x0040 75 #define BRF_1152000 0x0080 76 #define BRF_4000000 0x0100 77 78 #if defined(__GNUC__) 79 # pragma pack() 80 #endif 81 82 #endif /* IRDA_IRLAP_H */