Mistake on this page?
Report an issue in GitHub or email us
pal_sys.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief System hooks.
6  *
7  * Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef PAL_SYS_H
26 #define PAL_SYS_H
27 
28 #include "pal_types.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /*! \addtogroup PAL_SYS
35  * \{ */
36 
37 /**************************************************************************************************
38  Macros
39 **************************************************************************************************/
40 
41 /* Common error handling routines; for use with PAL implementation only. */
42 
43 #ifdef DEBUG
44 
45 /*! \brief Parameter check. */
46 #define PAL_SYS_ASSERT(expr) { if (!(expr)) { PalSysAssertTrap(); } }
47 
48 #else
49 
50 /*! \brief Parameter check (disabled). */
51 #define PAL_SYS_ASSERT(expr)
52 
53 #endif
54 
55 /**************************************************************************************************
56  Function Declarations
57 **************************************************************************************************/
58 
59 /* Initialization */
60 void PalSysInit(void);
61 
62 /* Diagnostics */
63 void PalSysAssertTrap(void);
64 void PalSysSetTrap(bool_t enable);
65 uint32_t PalSysGetAssertCount(void);
66 uint32_t PalSysGetStackUsage(void);
67 
68 /* Power Management */
69 void PalSysSleep(void);
70 bool_t PalSysIsBusy(void);
71 void PalSysSetBusy(void);
72 void PalSysSetIdle(void);
73 
74 /* Critical Section */
75 void PalEnterCs(void);
76 void PalExitCs(void);
77 
78 /*! \} */ /* PAL_SYS */
79 
80 #ifdef __cplusplus
81 };
82 #endif
83 
84 #endif /* PAL_SYS_H */
Platform-independent data types.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.