diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-08 07:44:07 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-08 07:44:07 +0000 |
| commit | 298122b5082d6bee5ab912cc89034453354d3ec1 (patch) | |
| tree | 67cc8f38d20179507f0f0678300bc0b8b9704d16 /Demos/Host/Incomplete/BluetoothHost/Lib | |
| parent | 759951690f9c00f6ba56f5903e965c78e2ae831b (diff) | |
Move out Bluetooth stack callback functions to a seperate BluetoothEvents.c/.h set of files for clarity in the Incomplete BluetoothHost demo. Add a new stack callback for opened ACL channels, make the demo save the RFCOMM channel when opened so that it does not have to search for it on each iteration of the main program loop.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1361 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib')
| -rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c | 2 | ||||
| -rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c index ec85aab6..d4b951da 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c @@ -552,6 +552,7 @@ static inline void Bluetooth_Signal_ConfigurationReq(const BT_Signal_Header_t* c break; case BT_Channel_Config_WaitReq: ChannelData->State = BT_Channel_Open; + Bluetooth_ChannelOpened(ChannelData); break; } } @@ -594,6 +595,7 @@ static inline void Bluetooth_Signal_ConfigurationResp(const BT_Signal_Header_t* break; case BT_Channel_Config_WaitResp: ChannelData->State = BT_Channel_Open; + Bluetooth_ChannelOpened(ChannelData); break; } } diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h index 131c4aaf..c1c93863 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h @@ -156,6 +156,8 @@ void Bluetooth_DisconnectionComplete(void); bool Bluetooth_ChannelConnectionRequest(const uint16_t PSM); void Bluetooth_PacketReceived(void* Data, uint16_t DataLen, Bluetooth_Channel_t* const Channel); + void Bluetooth_ChannelOpened(Bluetooth_Channel_t* const Channel); + Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue, const uint8_t SearchKey); Bluetooth_Channel_t* Bluetooth_OpenChannel(const uint16_t PSM); void Bluetooth_CloseChannel(Bluetooth_Channel_t* const Channel); |
