Make Bluetooth signalling handler routines use the generic Bluetooth_SendPacket(...
[pub/USBasp.git] / Demos / Host / Incomplete / BluetoothHost / Lib / BluetoothHCICommands.h
index 4df5861..9c1adf0 100644 (file)
@@ -42,8 +42,6 @@
                #include "BluetoothClassCodes.h"\r
 \r
        /* Macros: */\r
-               #define BT_HCI_DEBUG(s, ...)                           printf_P(PSTR("(HCI) " s "\r\n"), __VA_ARGS__)\r
-       \r
                #define OGF_LINK_CONTROL                               0x01\r
                #define OGF_CTRLR_BASEBAND                             0x03\r
                #define OGF_CTRLR_INFORMATIONAL                        0x04\r
@@ -83,6 +81,7 @@
                #define EVENT_PIN_CODE_REQUEST                         0x16\r
                \r
                #define ERROR_LIMITED_RESOURCES                        0x0D\r
+               #define ERROR_UNACCEPTABLE_BDADDR                      0x0F\r
                \r
        /* Type Defines: */\r
                typedef struct\r
 \r
                        uint8_t  ParameterLength;\r
                        uint8_t  Parameters[];\r
-               } Bluetooth_HCICommand_Header_t;\r
+               } BT_HCICommand_Header_t;\r
 \r
                typedef struct\r
                {\r
                        uint8_t  EventCode;\r
                        uint8_t  ParameterLength;\r
-               } Bluetooth_HCIEvent_Header_t;\r
+               } BT_HCIEvent_Header_t;\r
 \r
                typedef struct\r
                {\r
                                int OCF : 10;\r
                                int OGF : 6;\r
                        } OpCode;\r
-               } Bluetooth_HCIEvent_CommandStatus_t;\r
+               } BT_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
+               } BT_HCIEvent_CommandComplete_t;\r
 \r
                typedef struct\r
                {\r
                        uint8_t  ClassOfDevice_Service;\r
                        uint16_t ClassOfDevice_MajorMinor;\r
                        uint8_t  LinkType;\r
-               } Bluetooth_HCIEvent_ConnectionRequest_t;\r
+               } BT_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_t;\r
+               } BT_HCIEvent_ConnectionComplete_t;\r
                \r
                typedef struct\r
                {\r
                        uint8_t  RemoteAddress[6];\r
-               } Bluetooth_HCIEvent_PinCodeRequest_t;\r
+               } BT_HCIEvent_PinCodeReq_t;\r
                \r
                typedef struct\r
                {\r
                        uint8_t  RemoteAddress[6];\r
                        uint8_t  SlaveRole;\r
-               } Bluetooth_HCICommand_AcceptConnectionRequest_t;\r
+               } BT_HCICommand_AcceptConnectionReq_t;\r
                \r
                typedef struct\r
                {\r
                        uint8_t  RemoteAddress[6];\r
                        uint8_t  Reason;\r
-               } Bluetooth_HCICommand_RejectConnectionRequest_t;\r
+               } BT_HCICommand_RejectConnectionReq_t;\r
 \r
                typedef struct\r
                {\r
                        uint8_t  RemoteAddress[6];\r
                        uint8_t  PINCodeLength;\r
                        char     PINCode[16];\r
-               } Bluetooth_HCICommand_PinCodeResponse_t;\r
+               } BT_HCICommand_PinCodeResp_t;\r
                \r
        /* Enums: */\r
-               enum Bluetooth_ScanEnable_Modes_t\r
+               enum BT_ScanEnable_Modes_t\r
                {\r
                        BT_SCANMODE_NoScansEnabled       = 0,\r
                        BT_SCANMODE_InquiryScanOnly      = 1,\r
                        BT_SCANMODE_InquiryAndPageScans  = 3,\r
                };\r
 \r
-               enum BluetoothStack_States_t\r
+               enum BT_HCIStates_t\r
                {\r
                        Bluetooth_ProcessEvents          = 0,\r
                        Bluetooth_Init                   = 1,\r
                extern uint8_t Bluetooth_HCIProcessingState;\r
 \r
        /* Function Prototypes: */\r
-               void Bluetooth_ProcessHCICommands(void);\r
-               void Bluetooth_ProcessHCIEvents(void);\r
-\r
+               void Bluetooth_HCITask(void);\r
+                       \r
                #if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C)\r
                        static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint16_t ParameterLength);\r
                #endif\r