ZHCACY9 August 2023 CC2564C
以下函数负责将中断通道上的数据事务发送到远程实体。此函数在成功执行时返回零,而在出现任何错误时返回负值。
需要一个称为 ReportType 的参数,0 = rtOther,1 = rtInput,2 = rtOutput,3 = rtFeature。
HID_Data_Write(BluetoothStackID, HIDID, (HID_Report_Type_Type_t)TempParam->Params[0].intParam, sizeof(GenericMouseReport), GenericMouseReport)
int BTPSAPI HID_Data_Write(unsigned int BluetoothStackID, unsigned int HIDID, HID_Report_Type_Type_t ReportType, Word_t ReportPayloadSize, Byte_t *ReportDataPayload)
以下函数负责通过中断通道发送报告。该函数将以下内容作为输入:蓝牙协议栈的 ID(用于发送 ReportData)和已建立连接的 HID ID。第三个参数是要发送的报告的类型。最后两个参数是要发送的报告有效载荷的长度和指向要发送的报告有效载荷的指针。请注意,rtOther 和 rtFeature 是无效报告类型,不能与此函数一起使用。另请注意,rtInput 报告必须从设备发送至主机,而 rtOutput 报告必须从主机发送至设备。如果成功,此函数返回零;如果出现错误,则返回负的错误代码。