\r
typedef struct\r
{\r
- uint8_t CommandStatus;\r
- uint8_t CommandPackets;\r
+ uint8_t Status;\r
+ uint8_t Packets;\r
\r
struct\r
{\r
int OCF : 10;\r
int OGF : 6;\r
} OpCode;\r
- } Bluetooth_HCIEvent_CommandStatus_Header_t;\r
+ } Bluetooth_HCIEvent_CommandStatus_t;\r
\r
typedef struct\r
{\r
+ uint8_t HCLPacketsAllowable;\r
+ uint16_t Opcode;\r
+ uint8_t ReturnParams[];\r
+ } Bluetooth_HCIEvent_CommandComplete_t;\r
+\r
+ typedef struct\r
+ {\r
uint8_t RemoteAddress[6];\r
uint8_t ClassOfDevice_Service;\r
uint16_t ClassOfDevice_MajorMinor;\r
uint8_t LinkType;\r
- } Bluetooth_HCIEvent_ConnectionRequest_Header_t;\r
+ } Bluetooth_HCIEvent_ConnectionRequest_t;\r
\r
typedef struct\r
{\r
uint8_t RemoteAddress[6];\r
uint8_t LinkType;\r
uint8_t EncryptionEnabled;\r
- } Bluetooth_HCIEvent_ConnectionComplete_Header_t;\r
+ } Bluetooth_HCIEvent_ConnectionComplete_t;\r
+ \r
+ typedef struct\r
+ {\r
+ uint8_t RemoteAddress[6];\r
+ } Bluetooth_HCIEvent_PinCodeRequest_t;\r
\r
typedef struct\r
{\r
uint8_t RemoteAddress[6];\r
uint8_t SlaveRole;\r
- } Bluetooth_HCICommand_AcceptConnectionRequest_Params_t;\r
+ } Bluetooth_HCICommand_AcceptConnectionRequest_t;\r
\r
typedef struct\r
{\r
uint8_t RemoteAddress[6];\r
uint8_t Reason;\r
- } Bluetooth_HCICommand_RejectConnectionRequest_Params_t;\r
+ } Bluetooth_HCICommand_RejectConnectionRequest_t;\r
\r
typedef struct\r
{\r
uint8_t RemoteAddress[6];\r
uint8_t PINCodeLength;\r
char PINCode[16];\r
- } Bluetooth_HCICommand_PinCodeResponse_Params_t;\r
+ } Bluetooth_HCICommand_PinCodeResponse_t;\r
\r
/* Enums: */\r
enum Bluetooth_ScanEnable_Modes_t\r
\r
enum BluetoothStack_States_t\r
{\r
- Bluetooth_Init = 0,\r
- Bluetooth_Init_Reset = 1,\r
- Bluetooth_Init_ReadBufferSize = 2,\r
- Bluetooth_Init_SetEventMask = 3,\r
+ Bluetooth_ProcessEvents = 0,\r
+ Bluetooth_Init = 1,\r
+ Bluetooth_Init_Reset = 2,\r
+ Bluetooth_Init_ReadBufferSize = 3,\r
Bluetooth_Init_SetLocalName = 4,\r
Bluetooth_Init_SetDeviceClass = 5,\r
Bluetooth_Init_WriteScanEnable = 6,\r
- Bluetooth_PrepareToProcessEvents = 7,\r
- Bluetooth_ProcessEvents = 8,\r
- Bluetooth_Conn_AcceptConnection = 9,\r
- Bluetooth_Conn_RejectConnection = 10,\r
- Bluetooth_Conn_SendPINCode = 11,\r
+ Bluetooth_Conn_AcceptConnection = 7,\r
+ Bluetooth_Conn_RejectConnection = 8,\r
+ Bluetooth_Conn_SendPINCode = 9,\r
};\r
\r
/* External Variables: */\r
\r
/* Function Prototypes: */\r
void Bluetooth_ProcessHCICommands(void);\r
+ void Bluetooth_ProcessHCIEvents(void);\r
\r
#if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C)\r
static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength);\r
- static bool Bluetooth_GetNextHCIEventHeader(void);\r
- static void Bluetooth_DiscardRemainingHCIEventParameters(void);\r
- static void Bluetooth_ProcessHCICommands(void);\r
#endif\r
\r
#endif\r