EventP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2023, Texas Instruments Incorporated - https://www.ti.com
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
64 #ifndef ti_dpl_EventP__include
65 #define ti_dpl_EventP__include
66 
67 #include <stdint.h>
68 #include <stdbool.h>
69 #include <stddef.h>
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
82 #define EventP_STRUCT_SIZE (52)
83 
90 typedef union EventP_Struct
91 {
92  uint32_t dummy;
95 
99 #define EventP_WAIT_FOREVER ~(0)
100 
104 #define EventP_NO_WAIT (0)
105 
112 
128 extern EventP_Handle EventP_create(void);
129 
135 extern void EventP_delete(EventP_Handle handle);
136 
152 extern EventP_Handle EventP_construct(EventP_Struct *obj);
153 
162 extern void EventP_destruct(EventP_Struct *obj);
163 
195 extern uint32_t EventP_pend(EventP_Handle event, uint32_t eventMask, bool waitForAll, uint32_t timeout);
196 
211 extern void EventP_post(EventP_Handle event, uint32_t eventMask);
212 
224 extern void EventP_clear(EventP_Handle event, uint32_t eventMask);
225 
235 extern uint32_t EventP_get(EventP_Handle event);
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif /* ti_dpl_EventP__include */
uint8_t data[(52)]
Definition: EventP.h:93
void EventP_post(EventP_Handle event, uint32_t eventMask)
Post events to an event object.
EventP_Handle EventP_create(void)
Create an EventP, allocating memory on the heap.
EventP_Handle EventP_construct(EventP_Struct *obj)
Construct an EventP, using statically allocated memory.
void EventP_destruct(EventP_Struct *obj)
Function to destruct an EventP.
void EventP_delete(EventP_Handle handle)
Function to delete an EventP.
uint32_t EventP_pend(EventP_Handle event, uint32_t eventMask, bool waitForAll, uint32_t timeout)
Wait for the events listed in eventMask.
EventP structure.
Definition: EventP.h:90
union EventP_Struct EventP_Struct
EventP structure.
void EventP_clear(EventP_Handle event, uint32_t eventMask)
Clear events from an event object.
uint32_t EventP_get(EventP_Handle event)
Get the current events from an event object.
#define EventP_STRUCT_SIZE
Number of bytes greater than or equal to the size of any RTOS Event object.
Definition: EventP.h:82
uint32_t dummy
Definition: EventP.h:92
EventP_Struct * EventP_Handle
Opaque client reference to an instance of a EventP.
Definition: EventP.h:111
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale