Mistake on this page? Email us
pal_types.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // Copyright 2016-2019 ARM Ltd.
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // ----------------------------------------------------------------------------
18 
19 #ifndef _PAL_TYPES_H
20 #define _PAL_TYPES_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 #include <stdint.h>
26 #include <stdbool.h>
27 #include <stddef.h>
28 #if defined __cplusplus && !defined __STDC_FORMAT_MACROS
29  #define UNDEF__STDC_FORMAT_MACROS
30  #define __STDC_FORMAT_MACROS
31 #endif
32 #include <inttypes.h>
33 #ifdef UNDEF__STDC_FORMAT_MACROS
34  #undef UNDEF__STDC_FORMAT_MACROS
35  #undef __STDC_FORMAT_MACROS
36 #endif
37 #include <stdlib.h>
38 
39 #if defined(__ARMCC_VERSION) || defined ( __ICCARM__ ) || defined ( __SXOS__ )
40  typedef signed long off_t;
41 #else
42  #include <sys/types.h>
43 #endif
44 
51 #define NULLPTR 0
52 
53 #define PAL_INVALID_THREAD 0xFFFFFFFF
54 
55 typedef int32_t palStatus_t;
56 
57 typedef struct _palBuffer_t
58 {
59  uint32_t maxBufferLength;
60  uint32_t bufferLength;
61  uint8_t *buffer;
62 } palBuffer_t;
63 
64 typedef struct _palConstBuffer_t
65 {
66  const uint32_t maxBufferLength;
67  const uint32_t bufferLength;
68  const uint8_t *buffer;
70 
71 typedef struct sotpAreaData
72 {
73  uint32_t address;
74  size_t size;
76 
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif //_PAL_TYPES_H
const uint32_t bufferLength
Definition: pal_types.h:67
uint32_t bufferLength
Definition: pal_types.h:60
Definition: pal_types.h:57
struct sotpAreaData palSotpAreaData_t
struct _palBuffer_t palBuffer_t
struct _palConstBuffer_t palConstBuffer_t
uint32_t address
The address of the starting sector for the given area.
Definition: pal_types.h:73
const uint8_t * buffer
Definition: pal_types.h:68
uint32_t maxBufferLength
Definition: pal_types.h:59
Definition: pal_types.h:71
Definition: pal_types.h:64
size_t size
The size of the area.
Definition: pal_types.h:74
uint8_t * buffer
Definition: pal_types.h:61
const uint32_t maxBufferLength
Definition: pal_types.h:66
int32_t palStatus_t
Definition: pal_types.h:55