Yamaha CS-700 Integrators Reference Guide
15
4.1
USB Library Reference
This section describes the CS-700 Management Library's C interface. The header file is distributed with the CS-700
SDK.
CsDevComm_Mode enum
Description:
Enumeration of USB connections type. The client should specify the connection type, Auto,
HID, or Bulk, at the start of a session. Auto will select Bulk if available otherwise HID. Bulk
is preferable when upgrading firmware.
Syntax:
typedef enum {
CsDevComm_Mode_Auto = 0,
CsDevComm_Mode_Hid,
CsDevComm_Mode_Bulk,
CsDevComm_Mode_Num
} CsDevComm_Mode;
devAttach
Description:
Establish USB communication with a device.
Syntax:
EXPORT int __cdecl devAttach(int mode, void(*debug_callback)(char *msg),
void(*event_callback)(int type));
Parameters:
Parameter
Description
Mode
The USB connection mode, Auto, HID or Bulk, chosen from enum CsDevComm_Mode.
debug_callback
Pointer to callback function to handle debug messages.
Msg
Pointer to debug message.
event_callback
Pointer to callback function to handle events.
Type
Type of event as listed in table below.
Return Values:
Value
Description
-1
General error
0
Success
1
No device connected
2
Failed authentication
Event Types:
Type
Description
0xFF
Device disconnected