core/include/events.h File Reference

Event. More...

Data Structures

struct  os_event_s
 Compact type for event communication. More...


typedef struct os_event_s os_event_t
 Data type for event storage.


struct os_event_s os_event_invalid
 Invalid event.

Detailed Description


Piotr Romaniuk, (c) ELESOFTROM
1.0 Feb 4, 2011

DioneOS event type is a compact data type designed for communication between parts of the firmware (i.e. threads, ISRs). The type can fit into 4 bytes, so can easily be stored in unsigned long variable. Such a type is easy to be managed and copied, control of its lifetime is also simplified.

The events can be stored in specific ring buffer adapted to this data type (ring_buffer_ev.h).

There is assumption that void* is 16 bits long.
This implies a constraint on RAM memory model: --large_memory_model cannot be used.

Variable Documentation

Invalid event.

This predefined event is used for initialization and comparison. It contains specific pattern that can be recognized during debug:

 {.signal=0xEF, .subtype=0xBE, .xdata=(void*)0xDEAD}