TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
event.c File Reference

Functions

static K_EVENT_DEFINE (tt_event)
 LOG_MODULE_REGISTER (tt_event, CONFIG_TT_EVENT_LOG_LEVEL)
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.

Function Documentation

◆ K_EVENT_DEFINE()

K_EVENT_DEFINE ( tt_event )
static

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( tt_event ,
CONFIG_TT_EVENT_LOG_LEVEL  )

◆ tt_event_post()

uint32_t tt_event_post ( uint32_t events)

Post an event to Tenstorrent firmware.

Post one or more events.

Parameters
eventsThe events to post as a bitmask of tt_event values.
Returns
the previous value of posted events.
See also
k_event_post

◆ tt_event_wait()

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.

Note
This function may be called from ISR context only if timeout equals K_NO_WAIT.
Parameters
eventsThe events to wait for as a bitmask of tt_event values.
timeoutThe maximum time to wait for the event(s) to be posted.
Returns
On success, a bitmask of the received events (of type tt_event). Otherwise, zero.
See also
k_event_wait