SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Application Commands

Generic Access Profile Commands
Note: Reference the appendix for all Generic Access Profile Commands

Host
ConnectRemoteHIDDevice

Description

The following function is responsible for Connecting to a Remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

This command takes Inquiry Index number to work which can be found using the DisplayInquiryList command after an Inquiry has been completed.

Possible Return Values

(0)HID_Connect_Remote_Device: Function Successful

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1004)BTHID_ERROR_INSUFFICIENT_RESOURCES

API Call

HID_Connect_Remote_Device(BluetoothStackID, InquiryResultList[(TempParam->Params->intParam-1)], &HIDConfiguration, HID_Event_Callback, 0)

API Prototype

int BTPSAPI HID_Connect_Remote_Device(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, HID_Configuration_t *HIDConfiguration, HID_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a connection to a Remote HID Device on the Specified Bluetooth Device. This function accepts as its first parameter the Bluetooth Stack ID of the Bluetooth Stack which is to open the HID Connection. The second parameter specifies the Board Address (NON NULL) of the Remote Bluetooth Device to connect with. The third parameter to this function is the HID Configuration Specification to be used in the negotiation of the L2CAP Channels associated with this Device Client. The final two parameters specify the HID Event Callback function and Callback Parameter, respectively, of the HID Event Callback that is to process any further events associated with this Device Client. This function returns a non-zero, positive, value if successful, or a negative return error code if this function is unsuccessful. If this function is successful, the return value will represent the HID ID that can be passed to all other functions that require it. Once a Connection is opened to a Remote Device it can only be closed via a call to the HID_Close_Connection() function (passing in the return value from a successful call to this function as the HID ID input parameter).


CloseConnection

DescriptionThe following function is responsible for closing any ongoing connection. This function returns zero on successful execution and a negative value on all errors.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of Close connection.

Possible Return Values

(0) HID_Close_Connection: Function Successful

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1004)BTHID_ERROR_INSUFFICIENT_RESOURCES

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Close_Connection(BluetoothStackID, HIDID)

API Prototype

int BTPSAPI HID_Close_Connection(unsigned int BluetoothStackID, unsigned int HIDID)

Description of API

The following function is responsible for closing a HID connection established through a connection made to a Registered Server or a connection that was made by calling either the HID_Open_Remote_Device() or HID_Open_Remote_Host() functions. This function accepts as input the Bluetooth Stack ID of the Bluetooth Protocol Stack that the HID ID specified by the Second Parameter is valid for. This function returns zero if successful, or a negative return error code if an error occurred. Note that if this function is called with the HID ID of a Local Server, the Server will remain registered but the connection associated with the specified HID ID will be closed.


ControlRequest

Description

The following function is responsible for sending a HID_CONTROL Transaction to the remote entity. This function returns zero on successful execution and a negative value on all errors.

Parameters

If the Device is a Host then it requires one parameter which is the Control Operation, 0= hcNop, 1= hcHardReset, 2= hcSoftReset, 3= hcSuspend, 4=hcExitSuspend, 5=hcVirtualCableUnplug. If the Device is not a Host then it is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of Control Request

Possible Return Values

(0) HID_Control_Request: Function Successful

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Control_Request(BluetoothStackID, HIDID, (HID_Control_Operation_Type_t)((!IsHost)?(hcVirtualCableUnplug):(TempParam->Params->intParam)))

API Prototype

int BTPSAPI HID_Control_Request(unsigned int BluetoothStackID, unsigned int HIDID, HID_Control_Operation_Type_t ControlOperation)

Description of API

The following function is responsible for Sending a HID_CONTROL transaction to the remote side. This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. The third parameter is the Control Operation that will be sent. This function returns zero if successful, or a negative return error code if there as an error.

Note: Control Channel Transfers normally consist of two phases, a Request by the Host and a Response by the Device. However, HID Control transactions require no Response phase. Note that HID Control Requests are not allowed while other transactions are being processed unless the Control Operation Type is hcVirtualCableUnplug which may be sent at any time.

GetReportRequest

Description

The following function is responsible for sending a GET_REPORT Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

This function required three or four parameters. The first is size, 0 = grSizeOfReport, 1 = grUseBufferSize, the second is ReportType 0 = rtOther, 1 = rtInput, 2 = rtOutput, 3 = rtFeature, the third is ReportId. If the size parameter is 1, we need to specify a fourth parameter Buffersize.

Possible Return Values

(0) HID_Get_Report_Request: Function Successful

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

API Call

HID_Get_Report_Request(BluetoothStackID, HIDID, (HID_Get_Report_Size_Type_t)TempParam->Params[0].intParam, (HID_Report_Type_Type_t)TempParam->Params[1].intParam, (Byte_t)(TempParam->Params[2].intParam), (Word_t)(TempParam->Params[3].intParam))

API Prototype

HID_Get_Report_Request(unsigned int BluetoothStackID, unsigned int HIDID, HID_Get_Report_Size_Type_t Size, HID_Report_Type_Type_t ReportType, Byte_t ReportID, Word_t BufferSize)

Description of API

The following function is responsible for Sending a GET_REPORT transaction to the remote Device. This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. The third parameter is the descriptor that indicates how the Device is to determine the size of the buffer that the Host has allocated. The fourth parameter is the type of report requested. The fifth parameter is the Report ID determined by the Device's SDP record. Passing a zero for this parameter will indicate that this parameter is not used and will exclude the appropriate byte from the transaction payload. The fifth parameters use is based on the parameter passed as Size. If the Host indicates it has allocated a buffer of a size smaller than the report it is requesting, this parameter will be used as the size of the report returned. Otherwise, the appropriate bytes will not be included in the transaction payload. This function returns zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel Request shall be outstanding at a time. Reception of a HID Get Report Confirmation event indicates that a Response has been received and the Control Channel is now free for further Transactions.

SetReportRequest

Description

The following function is responsible for sending a SET_REPORT Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

SetReportRequest uses one parameter, ReportType 0 = rtOther, 1 = rtInput, 2 = rtOutput, 3 = rtFeature.

Possible Return Values

(0)HID_Set_Report_Request: Function Successful. (-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Set_Report_Request(BluetoothStackID, HIDID, (HID_Report_Type_Type_t)TempParam->Params[1].intParam, sizeof(GenericMouseReport), GenericMouseReport);

API Prototype

int BTPSAPI HID_Set_Report_Request(unsigned int BluetoothStackID, unsigned int HIDID, HID_Report_Type_Type_t ReportType, Word_t ReportPayloadSize, Byte_t *ReportDataPayload);

Description of API

The following function is responsible for sending a SET_REPORT request to the remote Device. This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which is to send the transaction and the HID ID for which the Connection has been established. The third parameter is the type of report being sent. Note that rtOther is an Invalid Report Type for use with this function. The final two parameters to this function are the Length of the Report Payload to send and a pointer to the Report Payload that will be sent. This function returns zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel Request shall be outstanding at a time. Reception of a HID Set Report Confirmation event indicates that a Response has been received and the Control Channel is now free for further Transactions.

GetProtocolRequest

Description

The following function is responsible for sending a GET_PROTOCOL Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of GetProtocolRequest .

Possible Return Values

(0)HID_Get_Protocol_Request: Function Successful. (-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Get_Protocol_Request(BluetoothStackID, HIDID)

API Prototype

int BTPSAPI HID_Get_Protocol_Request(unsigned int BluetoothStackID, unsigned int HIDID);

Description of API

The following function is responsible for sending a GET_PROTOCOL transaction to the remote HID Device. This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. This function returns a zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel request shall be outstanding at a time. Reception of a HID Get Protocol Confirmation event indicates that a response has been received and the Control Channel is now free for further Transactions.

SetProtocolRequest

Description

The following function is responsible for sending a SET_PROTOCOL Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

SetProtocolRequest needs one parameter which is Protocol, 0= ptReport and 1=ptBoot.

Possible Return Values

(0) HID_Set_Protocol_Request: Function Successful (-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Set_Protocol_Request(BluetoothStackID, HIDID, (HID_Protocol_Type_t)TempParam->Params[0].intParam)

API Prototype

int BTPSAPI HID_Set_Protocol_Request(unsigned int BluetoothStackID, unsigned int HIDID, HID_Protocol_Type_t Protocol)

Description of API

The following function is responsible for sending a SET_PROTOCOL transaction to the remote HID Device. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. The last parameter is the protocol to be set. This function returns a zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel Request shall be outstanding at a time. Reception of a HID Set Protocol Confirmation event indicates that a response has been received and the Control Channel is now free for further Transactions.

GetIdleRequest

Description

The following function is responsible for sending a GET_IDLE Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of GetIdleRequest.

Possible Return Values

(0) HID_Get_Idle_Request: Function Successful. (-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Get_Idle_Request(BluetoothStackID, HIDID)

API Prototype

int BTPSAPI HID_Get_Idle_Request(unsigned int BluetoothStackID, unsigned int HIDID)

Description of API

The following function is responsible for sending a GET_IDLE transaction to the remote HID Device. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. This function returns a zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel request shall be outstanding at a time. Reception of a HID Get Idle Confirmation event indicates that a response has been received and the Control Channel is now free for further Transactions.

SetIdleRequest

Description

The following function is responsible for sending a SET_IDLE Transaction to the remote HID Device. This function returns zero on successful execution and a negative value on all errors.

Parameters

SetIdleRequest requires one Parameter which is Idlerate.

Possible Return Values

(0) HID_Set_Idle_Request: Function Successful

(-4) FUNCTION_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1004)BTHID_ERROR_INSUFFICIENT_RESOURCES

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Set_Idle_Request(BluetoothStackID, HIDID, (Byte_t)TempParam->Params[0].intParam)

API Prototype

int BTPSAPI HID_Set_Idle_Request(unsigned int BluetoothStackID, unsigned int HIDID, Byte_t IdleRate)

Description of API

The following function is responsible for sending a SET_IDLE transaction to the remote HID Device. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the request and the HID ID for which the Connection has been established. The last parameter is the Idle Rate to be set. The Idle Rate LSB is weighted to 4ms (i.e. the Idle Rate resolution is 4ms with a range from 4ms to 1.020s). This function returns a zero if successful or a negative return error code if there was an error.

Note: Control Channel transfers have two phases, a Request by the Host and a Response by the Device. Only ONE Host control channel request shall be outstanding at a time. Reception of a HID Set Idle Confirmation event indicates that a response has been received and the Control Channel is now free for further Transactions.

DataWrite

Description

The following function is responsible for sending a DATA Transaction on the Interrupt Channel to the remote entity. This function returns zero on successful execution and a negative value on all errors.

Parameters

It requires one parameter which is ReportType, 0 = rtOther, 1 = rtInput, 2 = rtOutput, 3 = rtFeature.

Possible Return Values

(0) HID_Control_Request: Function Successful

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

API Call

HID_Data_Write(BluetoothStackID, HIDID, (HID_Report_Type_Type_t)TempParam->Params[0].intParam, sizeof(GenericMouseReport), GenericMouseReport)

API Prototype

int BTPSAPI HID_Data_Write(unsigned int BluetoothStackID, unsigned int HIDID, HID_Report_Type_Type_t ReportType, Word_t ReportPayloadSize, Byte_t *ReportDataPayload)

Description of API

The following function is responsible for sending Reports over the Interrupt Channel. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the Report Data and the HID ID for which the Connection has been established. The third Parameter is the type of report being sent. The final two parameters are the Length of the Report Payload to send and a pointer to the Report Payload that will be sent. Note that rtOther and rtFeature are Invalid Report Types for use with this function. Also note that rtInput Reports must be sent from the Device to the Host, and that rtOutput Reports must be sent from the Host to the Device. This function returns a zero if successful or a negative return error code if there was an error.


Client
GetReportResponse

Description

The following function is responsible for sending a response for an outstanding GET_REPORT Transaction to the remote HID Host. This function returns zero on successful execution and a negative value on all errors.

Parameters

GetReportResponse requires two parameters, ResultType, 0= rtSuccessful 1= rtNotReady, 2= rtErrInvalidReportID, 3= rtErrUnsupportedRequest, 4= rtErrInvalidParameter, 5= rtErrUnknown, 6= rtErrFatal, 7= rtData and ReportType, 0 = rtOther, 1 = rtInput, 2 = rtOutput, 3 = rtFeature.

Possible Return Values

(0) HID_Get_Report_Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Get_Report_Response(BluetoothStackID, HIDID, (HID_Result_Type_t)TempParam->Params[0].intParam, (HID_Report_Type_Type_t)TempParam->Params[1].intParam, sizeof(GenericMouseReport), GenericMouseReport);

API Prototype

int BTPSAPI HID_Get_Report_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType, HID_Report_Type_Type_t ReportType, Word_t ReportPayloadSize, Byte_t *ReportDataPayload);

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding GET_REPORT transaction. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtSuccessful Result Type is Invalid for use with this function. If the rtNotReady through rtErrFatal Result Statuses are used to respond, a HANDSHAKE response that has a Result Code parameter of the specified Error Condition is sent. If the ResultType specified is rtData, the GET_REPORT transaction is responded to with a DATA Response that has the Report (specified by the final parameter) as its Payload. The fourth parameter is the type of report being sent. Note that rtOther is an Invalid Report Type for use with this function. The final two parameters are the Length of the Report Payload to send and a pointer to the Report Payload that will be sent. This function returns a zero if successful, or a negative return error code if there was an error.


SetReportResponse

Description

The following function is responsible for sending a response for an outstanding SET_REPORT Transaction to the remote HID Host. This function returns zero on successful execution and a negative value on all errors.

Parameters

SetReportResponse requires one parameter which is ResultType, 0= rtSuccessful 1= rtNotReady, 2= rtErrInvalidReportID, 3= rtErrUnsupportedRequest, 4= rtErrInvalidParameter, 5= rtErrUnknown, 6= rtErrFatal, 7= rtData.

Possible Return Values

(0) HID_Set_Report_Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

API Call

HID_Get_Report_Response(BluetoothStackID, HIDID, (HID_Result_Type_t)TempParam->Params[0].intParam, (HID_Report_Type_Type_t)TempParam->Params[1].intParam, sizeof(GenericMouseReport), GenericMouseReport)

API Prototype

int BTPSAPI HID_Set_Report_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType)

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding SET_REPORT transaction. This function accepts as input the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtData Result Type is Invalid for use with this function. If the rtSuccessful through rtErrFatal Result Types are specified, this function responds to the SET_REPORT request with a HANDSHAKE response that has a Result Code parameter that matches the specified Result Type. This function returns zero if successful or a negative return error code if there was an error.


GetProtocolResponse

Description

The following function is responsible for sending a response for an outstanding GET_PROTOCOL Transaction to the remote HID Host. This function returns zero on successful execution and a negative value on all errors.

Parameters

GetProtocolResponse requires two parameters which are ResultType, 0= rtSuccessful, 1= rtNotReady, 2= rtErrInvalidReportID, 3= rtErrUnsupportedRequest, 4= rtErrInvalidParameter, 5= rtErrUnknown, 6= rtErrFatal, 7= rtData and Protocol, 0= ptReport and 1=ptBoot.

Possible Return Values

(0) HID_Get_Protocol_Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1004)BTHID_ERROR_INSUFFICIENT_RESOURCES

(-1005)BTHID_ERROR_INVALID_OPERATION

API Call

HID_Get_Protocol_Response(BluetoothStackID, HIDID, (HID_Result_Type_t)TempParam->Params[0].intParam, (HID_Protocol_Type_t)TempParam->Params[1].intParam)

API Prototype

int BTPSAPI HID_Get_Protocol_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType, HID_Protocol_Type_t Protocol)

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding GET_PROTOCOL transaction. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtSuccessful Result Type is Invalid for use with this function.If the rtNotReady through rtErrFatal Result Types are specified, this function will respond to the GET_PROTOCOL request with a HANDSHAKE response that has a Result Code parameter of the specified Error Condition. If the ResultType specified is rtData, the GET_PROTOCOL transaction is responded to with a DATA Response that has the Protocol type specified as the final parameter as its Payload. This function returns zero if successful or a negative return error code if there was an error.


SetProtocolResponse

(0) HID_Set_Protocol_Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Set_Protocol_Response(BluetoothStackID, HIDID, (HID_Protocol_Type_t)TempParam->Params[0].intParam)

API Prototype

int BTPSAPI HID_Set_Protocol_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType);

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding SET_PROTOCOL transaction. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtData Result Type is Invalid for use with this function. If the rtSuccessful through rtErrFatal Result Types are specified then this function will respond to the SET_PROTOCOL Transaction with a HANDSHAKE response that has a Result Code parameter that matches the specified Result Type. This function returns zero if successful, or a negative return error code if there was an error.


GetIdleResponse

Description

The following function is responsible for sending a response for an outstanding GET_IDLE Transaction to the remote HID Host. This function returns zero on successful execution and a negative value on all errors.

Parameters

GetIdleResponse requires two parameters, ResultType, 0= rtSuccessful, 1= rtNotReady, 2= rtErrInvalidReportID, 3= rtErrUnsupportedRequest, 4= rtErrInvalidParameter, 5= rtErrUnknown, 6= rtErrFatal, 7= rtData and IdleRate.

Possible Return Values

(0) HID_Set_Idle_Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

API Call

HID_Get_Idle_Response(BluetoothStackID, HIDID, (HID_Result_Type_t)TempParam->Params[0].intParam, (Byte_t)TempParam->Params[1].intParam)

API Prototype

int BTPSAPI HID_Get_Idle_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType, Byte_t IdleRate)

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding GET_IDLE transaction. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtSuccessful Result Type is Invalid for use with this function. If the rtNotReady through rtErrFatal Result Types are specified, then this function will respond to the GET_IDLE Transaction with a HANDSHAKE response that has a Result Code parameter of the specified Error Condition. If the ResultType specified is rtData the GET_IDLE transaction is responded to with a DATA Response that has the Idle Rate specified as the final parameter as its Payload. This function returns zero if successful, or a negative return error code if there was an error.


SetIdleResponse

Description

The following function is responsible for sending a response for an outstanding SET_IDLE Transaction to the remote HID Host. This function returns zero on successful execution and a negative value on all errors.

Parameters

SetIdleResponse requires one parameter which is ResultType, 0= rtSuccessful, 1= rtNotReady, 2= rtErrInvalidReportID, 3= rtErrUnsupportedRequest, 4= rtErrInvalidParameter, 5= rtErrUnknown, 6= rtErrFatal, 7= rtData.

Possible Return Values

(0) HID_Get_ Idle _Response: Function Successful.

(-4) FUNCTION_ERROR

(-6)INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-103)BTPS_ERROR_FEATURE_NOT_AVAILABLE

(-1000)BTHID_ERROR_INVALID_PARAMETER

(-1001)BTHID_ERROR_NOT_INITIALIZED

(-1002)BTHID_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1005)BTHID_ERROR_INVALID_OPERATION

(-1006)BTHID_ERROR_REQUEST_OUTSTANDING

API Call

HID_Set_Idle_Response(BluetoothStackID, HIDID, (HID_Result_Type_t)TempParam->Params[0].intParam)

API Prototype

int BTPSAPI HID_Set_Idle_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType)

Description of API

The following function is responsible for Sending the appropriate Response to an Outstanding SET_IDLE transaction. This function accepts the Bluetooth Stack ID of the Bluetooth Stack which is to send the response and the HID ID for which the Connection has been established. The third parameter to this function is the Result Type that is to be associated with this response. The rtData Result Type is Invalid for use with this function. If the rtSuccessful through rtErrFatal Result Types are specified, then this function will respond to the SET_IDLE Transaction with a HANDSHAKE response that has a Result Code parameter that matches the specified Result Type. This function returns zero if successful, or a negative return error code if there was an error.