aberco,
Here's a little ditty that should get you going with servicing CDC and DT-INTS-18.
Hope it helps.
Code:DEFINE OSC 48 INCLUDE "cdc_desc.bas" ;--- Setup Interrupts ------------------------------------------------------ INCLUDE "DT_INTS-18.bas" ; Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler USB_INT, _DoUSBSERVICE, ASM, yes INT_Handler INT_INT, _Handle_INT, PBP, yes endm INT_CREATE ; Creates the Low Priority interrupt processor INT_ENABLE USB_INT INT_ENABLE INT_INT ENDASM ;----[Initialise USB and Interrupts]---------------------------------------- PAUSE 100 ; Allow VUSB to stabilize USBINIT ; initialize the USB driver USBSERVICE ; service it once UIE = $7F ; enable USB interrupts UEIE = $9F ; enable USB Error interrupts ;----[Main program loop]---------------------------------------------------- Main: ; some code here GOTO Main ;----[Interrupt handler -- Service USB]------------------------------------- DoUSBSERVICE: USBSERVICE ; Run the SERVICE routines @ INT_RETURN ;----[Interrupt handler -- INT] Handle_INT: ; something here @ INT_RETURN




Bookmarks