VSF Documented
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/* compiler abstraction, supports GCC, IAR, Arm Compiler 5, Arm Compiler 6 */
27#include "./compiler/compiler.h"
28
29/* minimal OO support for interface definie only, no class support */
30#include "./3rd-party/PLOOC/raw/plooc.h"
31
32/* template for abstraction data type */
33#include "./template/template.h"
34
35/* other high level language externsion for OOPC */
37
38#ifndef __VSF_UTILITIES_H__
39#define __VSF_UTILITIES_H__
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/*============================ MACROS ========================================*/
46/*============================ MACROFIED FUNCTIONS ===========================*/
47/*============================ TYPES =========================================*/
48
49#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(__cplusplus)
50typedef struct vsf_mem_t vsf_mem_t;
51struct vsf_mem_t {
52 union {
53 // implement linux-style variable
56 void *obj;
57
60 void *obj_ptr;
61 } ptr;
63};
64#else
65typedef struct vsf_mem_t vsf_mem_t;
66struct vsf_mem_t {
67 union {
68 union {
69 // implement linux-style variable
71 uint8_t *src;
72 void *obj;
73
76 void *obj_ptr;
77 };
78 union {
81 void *obj_ptr;
82 } ptr;
83 };
84 union {
85 // implement linux-style variable
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 */
int int32_t
Definition stdint.h:8
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_utilities.h:51
void * obj
Definition vsf_utilities.h:56
uint8_t * src_ptr
Definition vsf_utilities.h:59
uint8_t * src
Definition vsf_utilities.h:55
uint8_t * buffer_ptr
Definition vsf_utilities.h:58
int32_t size
Definition vsf_utilities.h:62
uint8_t * buffer
Definition vsf_utilities.h:54
void * obj_ptr
Definition vsf_utilities.h:60
union vsf_mem_t::@1111 ptr
Generated from commit: vsfteam/vsf@74aa6ce