X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/fd96b288824caaa3ee4e5e03887f016de9df80cf..2a072db7030fa33be1e8dcf82ebf0b45cb4d77c1:/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h index 4df5861cf..9c1adf0f4 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h @@ -42,8 +42,6 @@ #include "BluetoothClassCodes.h" /* Macros: */ - #define BT_HCI_DEBUG(s, ...) printf_P(PSTR("(HCI) " s "\r\n"), __VA_ARGS__) - #define OGF_LINK_CONTROL 0x01 #define OGF_CTRLR_BASEBAND 0x03 #define OGF_CTRLR_INFORMATIONAL 0x04 @@ -83,6 +81,7 @@ #define EVENT_PIN_CODE_REQUEST 0x16 #define ERROR_LIMITED_RESOURCES 0x0D + #define ERROR_UNACCEPTABLE_BDADDR 0x0F /* Type Defines: */ typedef struct @@ -95,13 +94,13 @@ uint8_t ParameterLength; uint8_t Parameters[]; - } Bluetooth_HCICommand_Header_t; + } BT_HCICommand_Header_t; typedef struct { uint8_t EventCode; uint8_t ParameterLength; - } Bluetooth_HCIEvent_Header_t; + } BT_HCIEvent_Header_t; typedef struct { @@ -113,14 +112,14 @@ int OCF : 10; int OGF : 6; } OpCode; - } Bluetooth_HCIEvent_CommandStatus_t; + } BT_HCIEvent_CommandStatus_t; typedef struct { uint8_t HCLPacketsAllowable; uint16_t Opcode; uint8_t ReturnParams[]; - } Bluetooth_HCIEvent_CommandComplete_t; + } BT_HCIEvent_CommandComplete_t; typedef struct { @@ -128,7 +127,7 @@ uint8_t ClassOfDevice_Service; uint16_t ClassOfDevice_MajorMinor; uint8_t LinkType; - } Bluetooth_HCIEvent_ConnectionRequest_t; + } BT_HCIEvent_ConnectionRequest_t; typedef struct { @@ -137,34 +136,34 @@ uint8_t RemoteAddress[6]; uint8_t LinkType; uint8_t EncryptionEnabled; - } Bluetooth_HCIEvent_ConnectionComplete_t; + } BT_HCIEvent_ConnectionComplete_t; typedef struct { uint8_t RemoteAddress[6]; - } Bluetooth_HCIEvent_PinCodeRequest_t; + } BT_HCIEvent_PinCodeReq_t; typedef struct { uint8_t RemoteAddress[6]; uint8_t SlaveRole; - } Bluetooth_HCICommand_AcceptConnectionRequest_t; + } BT_HCICommand_AcceptConnectionReq_t; typedef struct { uint8_t RemoteAddress[6]; uint8_t Reason; - } Bluetooth_HCICommand_RejectConnectionRequest_t; + } BT_HCICommand_RejectConnectionReq_t; typedef struct { uint8_t RemoteAddress[6]; uint8_t PINCodeLength; char PINCode[16]; - } Bluetooth_HCICommand_PinCodeResponse_t; + } BT_HCICommand_PinCodeResp_t; /* Enums: */ - enum Bluetooth_ScanEnable_Modes_t + enum BT_ScanEnable_Modes_t { BT_SCANMODE_NoScansEnabled = 0, BT_SCANMODE_InquiryScanOnly = 1, @@ -172,7 +171,7 @@ BT_SCANMODE_InquiryAndPageScans = 3, }; - enum BluetoothStack_States_t + enum BT_HCIStates_t { Bluetooth_ProcessEvents = 0, Bluetooth_Init = 1, @@ -189,9 +188,8 @@ extern uint8_t Bluetooth_HCIProcessingState; /* Function Prototypes: */ - void Bluetooth_ProcessHCICommands(void); - void Bluetooth_ProcessHCIEvents(void); - + void Bluetooth_HCITask(void); + #if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C) static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint16_t ParameterLength); #endif