TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
|
Go to the source code of this file.
Macros | |
#define | TT_EVENT_ANY UINT32_MAX |
Bitmask of all Tenstorrent firmware events. |
Enumerations | |
enum | tt_event { TT_EVENT_THERM_TRIP = BIT(0) , TT_EVENT_WATCHDOG_EXPIRED = BIT(1) , TT_EVENT_PERST = BIT(2) , TT_EVENT_PGOOD = BIT(3) , TT_EVENT_BOARD_POWER_TO_SMC = BIT(4) , TT_EVENT_FAN_RPM_TO_SMC = BIT(5) , TT_EVENT_CM2DM_POLL = BIT(6) , TT_EVENT_LOGS_TO_SMC = BIT(7) , TT_EVENT_WAKE = BIT(31) } |
Event IDs for Tenstorrent firmware. More... |
Functions | |
uint32_t | tt_event_post (uint32_t events) |
Post an event to Tenstorrent firmware. | |
uint32_t | tt_event_wait (uint32_t events, k_timeout_t timeout) |
Wait for one or more events to be posted to Tenstorrent firmware. |
#define TT_EVENT_ANY UINT32_MAX |
Bitmask of all Tenstorrent firmware events.
enum tt_event |
Event IDs for Tenstorrent firmware.
The application thread of firmware can receive and react to events generated throughout the system. Multiple events may be posted and receieved simultaneously, as they form a bitmask.
Post an event to Tenstorrent firmware.
Post one or more events.
events | The events to post as a bitmask of tt_event values. |
uint32_t tt_event_wait | ( | uint32_t | events, |
k_timeout_t | timeout ) |
Wait for one or more events to be posted to Tenstorrent firmware.
Wait for one or more events to be posted to Tenstorrent firmware. The function will block until at least one of the specified events are received or timeout expires.
To block indefinitely, use K_FOREVER. To return immediately, use K_NO_WAIT.
To block for a specific time, use K_MSEC or K_USEC to specify the timeout.
On success, a bitmask of the received events (of type tt_event) is returned and the corresponding events are automatically cleared. When a timeout occurs, the function returns 0.
events | The events to wait for as a bitmask of tt_event values. |
timeout | The maximum time to wait for the event(s) to be posted. |