SecureCallback.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022 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 
33 /*
34  * ======== SecureCallback.h ========
35  */
36 
37 #ifndef ti_drivers_tfm_SecureCallback__include
38 #define ti_drivers_tfm_SecureCallback__include
39 
40 #include <stddef.h>
41 #include <stdint.h>
42 
43 #include <ti/drivers/utils/List.h>
44 
45 #if defined(__cplusplus)
46 extern "C" {
47 #endif
48 
49 typedef void (*SecureCallback_FuncPtr)(uintptr_t arg);
50 
51 typedef struct SecureCallback_Object
52 {
54  uintptr_t arg;
55  bool pending;
58 
60 
61 typedef struct SecureCallback_Config
62 {
63  uint32_t intNumber;
64  uint8_t intPriority;
66 
73 void SecureCallback_init(void);
74 
84 SecureCallback_Handle SecureCallback_construct(SecureCallback_Object *object,
86  uintptr_t arg);
87 
96 
106 void SecureCallback_post(SecureCallback_Handle handle);
107 
108 #if defined(__cplusplus)
109 }
110 #endif
111 
112 #endif /* ti_drivers_tfm_SecureCallback__include */
Definition: SecureCallback.h:51
void(* SecureCallback_FuncPtr)(uintptr_t arg)
Definition: SecureCallback.h:49
void SecureCallback_destruct(SecureCallback_Object *object)
Destruct a callback object, removing it from the servicing list.
void SecureCallback_post(SecureCallback_Handle handle)
Triggers the dispatcher targeting the specified callback.
uint32_t intNumber
Definition: SecureCallback.h:63
uint8_t intPriority
Definition: SecureCallback.h:64
Definition: SecureCallback.h:61
SecureCallback_FuncPtr fxn
Definition: SecureCallback.h:56
SecureCallback_Object * SecureCallback_Handle
Definition: SecureCallback.h:59
uintptr_t arg
Definition: SecureCallback.h:54
struct SecureCallback_Object SecureCallback_Object
bool pending
Definition: SecureCallback.h:55
struct SecureCallback_Config SecureCallback_Config
List_Elem elem
Definition: SecureCallback.h:53
Definition: List.h:126
SecureCallback_Handle SecureCallback_construct(SecureCallback_Object *object, SecureCallback_FuncPtr fxn, uintptr_t arg)
Construct a callback object and adds it to the servicing list.
Linked List interface for use in drivers.
void SecureCallback_init(void)
Initialize SecureCallback driver.
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale