MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / hid_write

Function hid_write

deps/SDL2/src/hidapi/android/hid.cpp:1031–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1029}
1030
1031int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length)
1032{
1033 if ( device )
1034 {
1035 LOGV( "hid_write id=%d length=%u", device->m_nId, length );
1036 hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
1037 if ( pDevice )
1038 {
1039 return pDevice->SendOutputReport( data, length );
1040 }
1041 }
1042 return -1; // Controller was disconnected
1043}
1044
1045// TODO: Implement timeout?
1046int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds)

Callers

nothing calls this directly

Calls 2

FindDeviceFunction · 0.85
SendOutputReportMethod · 0.80

Tested by

no test coverage detected