User manual
666
mikoC PRO for dsPIC
MikroElektronika
Gen_Enable
Prototype
void Gen_Enable(char* readbuff, char* writebuff);
Description Initialize the USB module of the MCU.
Parameters
- readbuff: Read Buffer.
- writebuff: Write Buffer.
Returns Nothing.
Requires USB needs to be enabled before using this function. See HID_Enable.
Example
Gen_Enable(&readbuff,&writebuff);
Notes None.
Gen_Read
Prototype
char Gen_Read(char *readbuff, char length, char ep);
Description Generic routine that receives the specied data from the specied endpoint.
Parameters
- readbuff: Received data.
- length: The length of the data that you wish to receive.
- ep: Endpoint number you want to receive the data into.
Returns Returns the number of received bytes, otherwise 0.
Requires USB needs to be enabled before using this function. See HID_Enable.
Example
while(Gen_Read(readbuff,64,1)==0)
;
Notes None.