User manual

mikroC PRO for dsPIC
MikroElektronika
663
HID_Enable
Prototype
void HID_Enable(char *readbuff, char *writebuff);
Description Enables USB HID communication.
Parameters
- readbuff: Read Buffer.
- writebuff: Write Buffer.
These parameters are used for HID communication.
Returns Nothing.
Requires Nothing.
Example HID_Enable(&readbuff,&writebuff);
Notes This function needs to be called before using other routines of USB HID Library.
HID_Read
Prototype
char HID_Read(void);
Description Receives message from host and stores it in the Read Buffer.
Parameters None.
Returns If the data reading has failed, the function returns 0. Otherwise, it returns number of characters
received from the host.
Requires USB HID needs to be enabled before using this function. See HID_Enable.
Example
// retry until success
while(!HID_Read())
;
Notes None.