1 /*
2 * Copyright (c) Texas Instruments Incorporated 2022
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * 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
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
33 /**
34 * \file SafeRTOS_priv.h
35 *
36 * \brief OSAL SafeRTOS private header file.
37 */
39 #ifndef OSAL_SAFERTOS_PRIV_H_
40 #define OSAL_SAFERTOS_PRIV_H_
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
46 /* ========================================================================== */
47 /* Include Files */
48 /* ========================================================================== */
50 #include <stdint.h>
51 #include <stdbool.h>
52 #include <stdlib.h>
53 #include <string.h>
55 #include <ti/csl/csl_types.h>
56 #include <ti/osal/osal.h>
57 #include <ti/osal/DebugP.h>
58 #include <ti/osal/soc/osal_soc.h>
60 #include <SafeRTOS_API.h>
61 #include <portable.h>
63 #if defined (BUILD_C7X)
64 #include "Hwi.h"
65 #endif
67 /* ========================================================================== */
68 /* Macros & Typedefs */
69 /* ========================================================================== */
71 /* None */
73 /* ========================================================================== */
74 /* Structure Declarations */
75 /* ========================================================================== */
77 /* Structure to dynamically allocate the value for timer ID,
78 * Event ID and Interrupt Number for the cores during run time. */
79 typedef struct Safertos_OSTimerParams_s
80 {
81 int32_t timerId; /* Timer ID */
82 #if defined (BUILD_C66X) || defined (BUILD_C7X)
83 int32_t eventId; /* Event Id used by Timer */
84 int32_t intNum; /* Interrupt Number used by Timer */
85 #endif
86 }Safertos_OSTimerParams;
88 /* ========================================================================== */
89 /* Global Variables */
90 /* ========================================================================== */
92 /* None */
94 /* ========================================================================== */
95 /* Function Declarations */
96 /* ========================================================================== */
98 portBaseType prvSetupHardware( void );
99 void prvGetOSTimerParams( Safertos_OSTimerParams *params);
101 #ifdef __cplusplus
102 }
103 #endif
105 #endif /* #ifndef OSAL_SAFERTOS_PRIV_H_ */