Mikroelektronika MIKROE-738 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
604
mikoC PRO for PIC32
MikroElektronika
Gen_Read
Prototype
char Gen_Read(char *readbuff, char length, char ep);
Description Generic routine that receives the specified data from the specified endpoint.
Parameters -
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.
Gen_Write
Prototype
char Gen_Write(char* writebuff, char length, char ep);
Description Sends the specified data to the specified endpoint.
Parameters -
Parameters -
writebuff
: The data that you want to send.
-
length
: the length of the data that you wish to send.
-
ep
: Endpoint number you want to send the data into.
Returns
Returns the number of transmitted bytes, otherwise 0.
Requires
USB needs to be enabled before using this function. See HID_Enable.
Example
while(Gen_Write(writebuff,64,1)==0)
;
Notes
None.