SWRA770 august 2023 CC2564C
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.
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.
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)
int BTPSAPI HID_Get_Report_Response(unsigned int BluetoothStackID, unsigned int HIDID, HID_Result_Type_t ResultType, HID_Report_Type_Type_t ReportType, Word_tReportPayloadSize, Byte_t *ReportDataPayload)
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 BluetoothStack 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 withth is 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 the 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. This function returns a zero if successful, or a negative return error code if there was an error.