VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
Examples
File List
Globals
source
utilities
vsf_utilities.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright(C)2009-2022 by VSF Team *
3
* *
4
* Licensed under the Apache License, Version 2.0 (the "License"); *
5
* you may not use this file except in compliance with the License. *
6
* You may obtain a copy of the License at *
7
* *
8
* http://www.apache.org/licenses/LICENSE-2.0 *
9
* *
10
* Unless required by applicable law or agreed to in writing, software *
11
* distributed under the License is distributed on an "AS IS" BASIS, *
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13
* See the License for the specific language governing permissions and *
14
* limitations under the License. *
15
* *
16
****************************************************************************/
17
18
21
/*============================ MACROS ========================================*/
22
/*============================ INCLUDES ======================================*/
23
/* do not modify this */
24
#include "
./vsf_utilities_cfg.h
"
25
26
/* minimal OO support for interface definie only, no class support */
27
#include "./3rd-party/PLOOC/raw/plooc.h"
28
29
/* compiler abstraction, supports GCC, IAR, Arm Compiler 5, Arm Compiler 6 */
30
#include "
./compiler/compiler.h
"
31
32
/* template for abstraction data type */
33
#include "
./template/template.h
"
34
35
/* other high level language externsion for OOPC */
36
#include "
./language_extension/language_extension.h
"
37
38
#ifndef __VSF_UTILITIES_H__
39
#define __VSF_UTILITIES_H__
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
/*============================ MACROS ========================================*/
46
/*============================ MACROFIED FUNCTIONS ===========================*/
47
/*============================ TYPES =========================================*/
48
49
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(__cplusplus)
50
typedef
struct
vsf_mem_t vsf_mem_t;
51
struct
vsf_mem_t {
52
union
{
53
// implement linux-style variable
54
uint8_t
*buffer;
55
uint8_t
*src;
56
void
*obj;
57
58
uint8_t
*buffer_ptr;
59
uint8_t
*src_ptr;
60
void
*obj_ptr;
61
} ptr;
62
int32_t
size
;
63
};
64
#else
65
typedef
struct
vsf_mem_t vsf_mem_t;
66
struct
vsf_mem_t {
67
union
{
68
union
{
69
// implement linux-style variable
70
uint8_t
*buffer;
71
uint8_t
*src;
72
void
*obj;
73
74
uint8_t
*buffer_ptr;
75
uint8_t
*src_ptr;
76
void
*obj_ptr;
77
};
78
union
{
79
uint8_t
*buffer_ptr;
80
uint8_t
*src_ptr;
81
void
*obj_ptr;
82
} ptr;
83
};
84
union
{
85
// implement linux-style variable
86
int32_t
size
;
87
int32_t
s32_size;
88
};
89
};
90
#endif
91
92
/*============================ GLOBAL VARIABLES ==============================*/
93
/*============================ LOCAL VARIABLES ===============================*/
94
/*============================ PROTOTYPES ====================================*/
95
96
#ifdef __cplusplus
97
}
98
#endif
99
100
#endif
101
/* EOF */
language_extension.h
uint8_t
unsigned char uint8_t
Definition
stdint.h:5
int32_t
int int32_t
Definition
stdint.h:8
template.h
compiler.h
size
uint32_t size
Definition
vsf_memfs.h:50
vsf_utilities_cfg.h
Generated from commit:
vsfteam/vsf@5de27dd