SWRA770 august 2023 CC2564C
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.
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.
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))
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)
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 indicated that this parameter is not used and excludes the appropriate byte from the transaction payload. The fifth parameters use is based on the parameter passed as size. If the host indicates an allocation for a smaller size of buffer than the report is requesting, this parameter is used as the size of the report returned. Otherwise, the appropriate bytes are not included in the transaction payload. This function returns zero if successful or a negative return error code if there was an error.