SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
(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.
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.
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.