summaryrefslogtreecommitdiff
path: root/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-04-06 08:14:08 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-04-06 08:14:08 +0000
commitf6012016cdd7599f5655fbac7cddda98a1679013 (patch)
treef01814bcc62d2498f733bc954c364283c0b721aa /Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
parente1ab89cc2123f8f5152411e1b297430b545c04bc (diff)
Add bidirectional channel configuration -- remote device is not ACKing sent Configuration Requests, needs further debugging. Implement Bluetooth spec's channel states.
Use abbreviations for the structure and function names where possible to try to cut down on the code verbosity. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1197 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
index b529ea48..8d356d88 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
@@ -48,14 +48,25 @@
#define CHANNEL_PSM_RFCOMM 0x0003
/* Enums: */
- enum Bluetooth_Channel_State_t
+ enum BT_ChannelStates_t
{
- Channel_Closed = 0,
- Channel_WaitConnect = 1,
- Channel_WaitConnectRsp = 2,
- Channel_Config = 3,
- Channel_Open = 4,
- Channel_WaitDisconnect = 5,
+ Channel_Closed = 0,
+ Channel_WaitConnect = 1,
+ Channel_WaitConnectRsp = 2,
+ Channel_Config_WaitConfig = 3,
+ Channel_Config_WaitSendConfig = 4,
+ Channel_Config_WaitReqResp = 5,
+ Channel_Config_WaitResp = 6,
+ Channel_Config_WaitReq = 7,
+ Channel_Open = 8,
+ Channel_WaitDisconnect = 9,
+ };
+
+ enum Endpoint_ControlStream_RW_ErrorCodes_t
+ {
+ BT_SENDPACKET_NoError = 0,
+ BT_SENDPACKET_NotConnected = 1,
+ BT_SENDPACKET_ChannelNotOpen = 2,
};
/* Type Defines: */
@@ -65,7 +76,7 @@
uint16_t LocalNumber;
uint16_t RemoteNumber;
uint16_t PSM;
- uint16_t MTU;
+ uint16_t RemoteMTU;
} Bluetooth_Channel_t;
typedef struct
@@ -74,6 +85,7 @@
uint16_t ConnectionHandle;
uint8_t RemoteAddress[6];
Bluetooth_Channel_t Channels[BLUETOOTH_MAX_OPEN_CHANNELS];
+ uint8_t SignallingIdentifier;
} Bluetooth_Connection_t;
typedef struct