Whereas interrupts provide notification to the target that an event has occurred, Events allow the target to notify other host components of the event occurrence, such as to signal to a virtual USB host that a virtual USB endpoint is armed and ready.
To create an event which the target can fire, open the Target Model Builder and select the Events tab. Right-click in the tab area and click “New” to create a new event. Name the event “USBEP0INArmed” to indicate that the event fires when the target has armed the USB Endpoint 0 IN endpoint, then click Done.
![](https://www.virtuoso-software.com/wp-content/uploads/2018/09/01-NewEvent-e1537180974281.png)
You will now see the target schematic component updated with a USBEP0INArmed output port, ready to be connected to another host component or another virtual target which can receive the event.
![](https://www.virtuoso-software.com/wp-content/uploads/2018/09/02-SchematicComponentWIthEvent-e1537181039353.png)
To fire the event from the target code, open Virtuoso.h and you will see the header file has been updated to include a hUSBEP0INArmed symbol.
![](https://www.virtuoso-software.com/wp-content/uploads/2018/09/03-EventHandle.png)
You will also notice a RaiseVirtuosoEvent function defined in Virtuoso.h, as shown below.
![](https://www.virtuoso-software.com/wp-content/uploads/2018/09/04-RaiseVirtuosoEvent.png)
To fire the event, simply call this function, specifying the appropriate event handle symbol, and the framework will route the event as needed.