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.

This commit is contained in:
Dean Camera 2010-07-08 07:44:07 +00:00
parent dea897ef57
commit 70983caea5
9 changed files with 241 additions and 118 deletions

View file

@ -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);