aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-04-06 08:14:08 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-04-06 08:14:08 +0000
commitc77f136661ae0fa779c02ef6efeab95aa4b92068 (patch)
treef01814bcc62d2498f733bc954c364283c0b721aa /Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
parentb9c7d196152652df918a822522061c3fe193d273 (diff)
downloadlufa-c77f136661ae0fa779c02ef6efeab95aa4b92068.tar.gz
lufa-c77f136661ae0fa779c02ef6efeab95aa4b92068.tar.bz2
lufa-c77f136661ae0fa779c02ef6efeab95aa4b92068.zip
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.
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 b529ea483..8d356d88d 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