mynewt-core event and event queue abstraction  
More...
mynewt-core event and event queue abstraction 
- Author
- Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr 
Definition in file os_eventq.h.
Go to the source code of this file.
◆ os_event_fn
      
        
          | typedef void os_event_fn(struct os_event *ev) | 
      
 
Event callback function. 
Definition at line 50 of file os_eventq.h.
 
 
◆ os_event_get_arg()
  
  | 
        
          | static void * os_event_get_arg | ( | struct os_event * | ev | ) |  |  | inlinestatic | 
 
Returns event argument. 
- Parameters
- 
  
  
Definition at line 88 of file os_eventq.h.
 
 
◆ os_event_init()
Init a event. 
- Parameters
- 
  
    | [in] | ev | pointer to event to set |  | [in] | fn | event callback function |  | [in] | arg | event argument |  
 
Definition at line 59 of file os_eventq.h.
 
 
◆ os_event_is_queued()
  
  | 
        
          | static bool os_event_is_queued | ( | struct os_event * | ev | ) |  |  | inlinestatic | 
 
Check if event is in queue. 
- Parameters
- 
  
  
- Returns
- true if event is queues, false otherwise 
Definition at line 78 of file os_eventq.h.
 
 
◆ os_event_run()
  
  | 
        
          | static void os_event_run | ( | struct os_event * | ev | ) |  |  | inlinestatic | 
 
 
◆ os_event_set_arg()
  
  | 
        
          | static void os_event_set_arg | ( | struct os_event * | ev, |  
          |  |  | void * | arg ) |  | inlinestatic | 
 
Set the event argument. 
- Parameters
- 
  
    | [in] | ev | event |  | [in] | arg | arg to set event |  
 
Definition at line 99 of file os_eventq.h.
 
 
◆ os_eventq_deinit()
  
  | 
        
          | static void os_eventq_deinit | ( | struct os_eventq * | evq | ) |  |  | inlinestatic | 
 
Deinitialize an event queue. 
- Note
- Not supported in RIOT
- Parameters
- 
  
    | [in] | evq | the event queue to deinit |  
 
Definition at line 141 of file os_eventq.h.
 
 
◆ os_eventq_get()
Get next event from event queue. 
- Parameters
- 
  
    | [in] | evq | the event queue to pull an event from |  | [in] | tmo | timeout, OS_WAIT_FOREVER to block, 0 to return immediately |  
 
- Returns
- the event from the queue 
Definition at line 155 of file os_eventq.h.
 
 
◆ os_eventq_get_no_wait()
Get next event from event queue, non-blocking. 
- Returns
- event from the queue, or NULL if none available. 
Definition at line 177 of file os_eventq.h.
 
 
◆ os_eventq_init()
  
  | 
        
          | static void os_eventq_init | ( | struct os_eventq * | evq | ) |  |  | inlinestatic | 
 
Initialize the event queue. 
- Parameters
- 
  
    | [in] | evq | The event queue to initialize |  
 
Definition at line 119 of file os_eventq.h.
 
 
◆ os_eventq_inited()
  
  | 
        
          | static int os_eventq_inited | ( | struct os_eventq * | evq | ) |  |  | inlinestatic | 
 
Check whether the event queue is initialized. 
- Parameters
- 
  
    | [in] | evq | the event queue to check |  
 
Definition at line 129 of file os_eventq.h.
 
 
◆ os_eventq_is_empty()
  
  | 
        
          | static bool os_eventq_is_empty | ( | struct os_eventq * | evq | ) |  |  | inlinestatic | 
 
Check if queue is empty. 
- Parameters
- 
  
    | [in] | evq | the event queue to check |  
 
- Returns
- true if empty, false otherwise 
Definition at line 226 of file os_eventq.h.
 
 
◆ os_eventq_put()
Put an event on the event queue. 
- Parameters
- 
  
    | [in] | evq | event queue |  | [in] | ev | event to put in queue |  
 
Definition at line 192 of file os_eventq.h.
 
 
◆ os_eventq_remove()
Remove an event from the queue. 
- Parameters
- 
  
    | [in] | evq | event queue to remove the event from |  | [in] | ev | event to remove from the queue |  
 
Definition at line 203 of file os_eventq.h.
 
 
◆ os_eventq_run()
  
  | 
        
          | static void os_eventq_run | ( | struct os_eventq * | evq | ) |  |  | inlinestatic | 
 
Gets and runs an event from the queue callback. 
- Parameters
- 
  
    | [in] | evq | The event queue to pull the item off. |  
 
Definition at line 213 of file os_eventq.h.