Momentary Push Button Example
Description
This is a simple demo project that shows how to use virtual momentary push-button that can be polled by your application.
char SIM_PushButtonState; // Variable to store the push-button state. This will bind to Virtual Input Button control
char SIM_LEDState; // Variable to store the value of LED state. This will bind to Virtual Device LED control variable
void LEDOn() // Function to Set the LED State
{
SIM_LEDState = SIM_PushButtonState;
}
void InitVirtuoso()
{
#ifdef _WINDOWS
InitializeVirtuoso();
#endif //_WINDOWS
}
void main()
{
InitVirtuoso();
while (1)
{
LEDOn();
}
}