Home Contents | # Introduction | Event | Core4 Lua Event System

## DESCRIPTION

The Core4 Lua Event System does generic event processing for Lua applications. Event sources are, for example, a keyboard/keypad, a touchscreen, a serial interface, a network connection, a timer and others.

The event system uses the concept of event loops. The event loop runs by calling event:poll(), which blocks until an event occurs and has been processed. Event loops can be nested (but beware of the dragons.)

Whenever an event happens, the event system will preprocess the event and pass it on to a callback.

As long as no event happens, the application sleeps and does not use any CPU resources. This is a necessity in multitasking environments, as opposed to simpler embedded systems using busy waiting.

The following event processors are available:

- BiS-Protocol
- Generic File I/O (Including serial ports and network sockets)
- Keyboard/Keypad
- Leadus V4KF Card Reader
- MTD16-Protocol
- Suprema Fingerprint Scanner
- Timers
- Touch screen

## SEE ALSO

event:add, event.new, event:pause, event:poll, event:reset, event:shell, event:timer, evh:enable, evh:disable, evh:close