Make Bluetooth signalling handler routines use the generic Bluetooth_SendPacket() routine for their responses. Use a better method of controlling the debug output verbosity.

This commit is contained in:
Dean Camera 2010-04-06 13:39:18 +00:00
parent c77f136661
commit 2a072db703
4 changed files with 186 additions and 267 deletions

View file

@ -47,6 +47,8 @@
#define CHANNEL_PSM_SERVICEDISCOVERY 0x0001
#define CHANNEL_PSM_RFCOMM 0x0003
#define MAXIMUM_CHANNEL_MTU 255
/* Enums: */
enum BT_ChannelStates_t
{
@ -76,6 +78,7 @@
uint16_t LocalNumber;
uint16_t RemoteNumber;
uint16_t PSM;
uint16_t LocalMTU;
uint16_t RemoteMTU;
} Bluetooth_Channel_t;
@ -106,10 +109,11 @@
void Bluetooth_Stack_Init(void);
void Bluetooth_Stack_USBTask(void);
bool Bluetooth_ConnectionRequest(uint8_t* RemoteAddress);
void Bluetooth_ConnectionComplete(void);
void Bluetooth_DisconnectionComplete(void);
void Bluetooth_PacketReceived(uint16_t* PacketLength, Bluetooth_Channel_t* Channel);
bool Bluetooth_ConnectionRequest(uint8_t* RemoteAddress);
void Bluetooth_ConnectionComplete(void);
void Bluetooth_DisconnectionComplete(void);
void Bluetooth_PacketReceived(uint16_t* PacketLength, Bluetooth_Channel_t* Channel);
uint8_t Bluetooth_SendPacket(void* Data, uint16_t DataLen, Bluetooth_Channel_t* Channel);
/* External Variables: */
extern Bluetooth_Device_t Bluetooth_DeviceConfiguration;