| 1029 | } |
| 1030 | |
| 1031 | int 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? |
| 1046 | int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds) |
nothing calls this directly
no test coverage detected