revert between 56095 -> 55830 in arch
[AROS.git] / compiler / include / bluetooth / rfcomm.h
blob97355e9644b18c1194727a30c66c0c501967ac68
1 #ifndef BLUETOOTH_RFCOMM_H
2 #define BLUETOOTH_RFCOMM_H
3 /*
4 ** $VER: rfcomm.h 1.0 (09.07.06)
5 **
6 ** Bluetooth RFCOMM with TS07.10 Protocol (RFCOMM) definitions include file
7 **
8 ** (C) Copyright 2006 Chris Hodges
9 ** All Rights Reserved
12 #if defined(__GNUC__)
13 # pragma pack(1)
14 #endif
16 #define RFCOMMF_EA 0x01
17 #define RFCOMMF_CR 0x02
18 #define RFCOMMM_DLCI 0x7c
19 #define RFCOMMS_DLCI 2
20 #define RFCOMMM_LEN 0xfe
21 #define RFCOMMS_LEN 1
23 struct RFFrame
25 //UBYTE rff_OpenFlag; // not used with RFCOMM
26 UBYTE rff_Address;
27 UBYTE rff_Control;
28 UBYTE rff_Data[0];
29 UBYTE rff_FCS;
30 //UBYTE rff_CloseFlag;
33 #define RFCOMMF_CTRL_PF 0x10
34 #define RFCOMMF_CTRL_SABN 0x2f // Set Asynchronous Balanced Mode
35 #define RFCOMMF_CTRL_UA 0x63 // Unnumbered Acknoledgement
36 #define RFCOMMF_CTRL_DM 0x0f // Disconnect Mode
37 #define RFCOMMF_CTRL_DISC 0x43 // Disconnect
38 #define RFCOMMF_CTRL_UIH 0xef // Unnumbered Information with Header Check
39 #define RFCOMMF_CTRL_UI 0x02 // Unnumbered Information, not supported by RFCOMM
41 struct RFCOMMMsg
43 UBYTE rfm_Type;
44 UBYTE rfm_Length; // variable size (RFCAF_EA set indicates last byte)
45 UBYTE rfm_Data[0];
48 #define RFCOMM_CMD_PN 0x20 // Parameter Negotiation, 8 bytes
49 #define RFCOMM_CMD_PSC 0x10 // Power Saving Control, not used in RFCOMM
50 #define RFCOMM_CMD_CLD 0x30 // Multiplexer close down, not used in RFCOMM
51 #define RFCOMM_CMD_TEST 0x08 // Test (echo)
52 #define RFCOMM_CMD_FCON 0x28 // Flow Control on
53 #define RFCOMM_CMD_FCOFF 0x18 // Flow Control off
54 #define RFCOMM_CMD_MSC 0x38 // Modem Status Command, 2-3 bytes
55 #define RFCOMM_CMD_NSC 0x04 // Not Supported Command, 1 byte
56 #define RFCOMM_CMD_RPN 0x24 // Remote Port Negotiation Command, 1 or 8 bytes
57 #define RFCOMM_CMD_RLS 0x14 // Remote Line Status, 1 byte
58 #define RFCOMM_CMD_SNC 0x34 // Service Negotiation Command, not used in RFCOMM
60 #if defined(__GNUC__)
61 # pragma pack()
62 #endif
64 #endif /* BLUETOOTH_RFCOMM_H */