User manual

664
mikoC PRO for dsPIC
MikroElektronika
HID_Write
Prototype
char HID_Write(char *writebuff, char len);
Description Function sends data from Write Buffer writebuff to host.
Parameters
- writebuff: Write Buffer, same parameter as used in initialization; see HID_Enable.
- len: species a length of the data to be transmitted.
Returns If the data transmitting has failed, the function returns 0. Otherwise, it returns number of transmitted
bytes.
Requires USB HID needs to be enabled before using this function. See HID_Enable.
Example
// retry until success
while(!HID_Write(&writebuff,64))
;
Notes Function call needs to be repeated as long as data is not successfuly sent.
HID_Disable
Prototype
void HID_Disable(void);
Description Disables USB HID communication.
Parameters None.
Returns Nothing.
Requires USB HID needs to be enabled before using this function. See HID_Enable.
Example
HID_Disable();
Notes None.