User manual
mikroPascal PRO for PIC32
MikroElektronika
565
USB_Polling_Proc
Prototype
procedure USB_Polling_Proc();
Description This routine is used for servicing various USB bus events. It should be periodically, preferably every 
100 microseconds.
Parameters None.
Returns Nothing.
Requires Nothing.
Example
while TRUE do
begin
 USB_Polling_Proc();
 kk := HID_Read();
 if (kk <> 0) then
 begin
 for cnt := 0 to 64
 writebuff[cnt] := readbuff[cnt];
 HID_Write(@writebuff,64);
 end;
end;
Notes Do not use this functions with USB_Interrupt_Proc. To enable servicing by polling, USB_INTERRUPT 
constant should be set to 0 (it is located in descriptor le).
Gen_Enable
Prototype
procedure Gen_Enable(readbuff : ^byte; writebuff : ^byte);
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.










