|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
ESP-IDF-compatible event-base identity: the type and its two declarators. More...
Go to the source code of this file.
Macros | |
| #define | ESP_EVENT_DECLARE_BASE(id) |
| Declare an event base defined in some other translation unit. | |
| #define | ESP_EVENT_DEFINE_BASE(id) |
| Define an event base, giving it its address and its name. | |
Typedefs | |
| typedef const char * | esp_event_base_t |
| Identity of an event-producing subsystem. | |
ESP-IDF-compatible event-base identity: the type and its two declarators.
host/esp_hosted_os_abstraction.h includes esp_event_base.h by name, and every vendored translation unit that touches the OS-abstraction vtable – which is nearly all of them – reaches it transitively. It is included for one type: entry 66 of the vtable is int (*_h_event_post)(esp_event_base_t event_base, int32_t event_id, ...).
Note also that host/esp_hosted_event.h – the file that uses ESP_EVENT_DECLARE_BASE – includes esp_event.h and esp_system.h, not this header. Those two are separate compatibility headers owned elsewhere in this port; this file supplies what they are expected to expose.
Definition in file esp_event_base.h.
| #define ESP_EVENT_DECLARE_BASE | ( | id | ) |
Declare an event base defined in some other translation unit.
Expands to an extern declaration of a const-qualified esp_event_base_t object. Belongs in a header, so that every file posting against the base refers to one object; the matching ESP_EVENT_DEFINE_BASE belongs in exactly one .c. The vendored host/esp_hosted_event.h invokes this once, for ESP_HOSTED_EVENT.
| [in] | id | Identifier naming the base, used verbatim as the object name. |
Definition at line 101 of file esp_event_base.h.
| #define ESP_EVENT_DEFINE_BASE | ( | id | ) |
Define an event base, giving it its address and its name.
The definition half of ESP_EVENT_DECLARE_BASE, and the reason both are here: the vendored tree declares ESP_HOSTED_EVENT and posts against it but never defines it, leaving the definition to the integrator. It initialises the object with the stringised identifier, so the base's log name cannot drift from the symbol callers write.
| [in] | id | Identifier naming the base. Must match the identifier passed to ESP_EVENT_DECLARE_BASE in the corresponding header. |
Definition at line 125 of file esp_event_base.h.
| typedef const char* esp_event_base_t |
Identity of an event-producing subsystem.
A const char*, exactly as in ESP-IDF. The pointer value is the identity and the string it addresses is a human-readable name for logs; a consumer compares bases with ==, never with strcmp. The vendored core uses exactly one, ESP_HOSTED_EVENT, and passes it as the first argument of the OS-abstraction vtable's _h_event_post entry.
Definition at line 78 of file esp_event_base.h.