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
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};
65#else
68typedef struct vsf_mem_t vsf_mem_t;
69struct vsf_mem_t {
70 union {
71 union {
72 // implement linux-style variable
74 uint8_t *src;
75 void *obj;
76
79 void *obj_ptr;
80 };
81 union {
84 void *obj_ptr;
85 } ptr;
86 };
87 union {
88 // implement linux-style variable
90 int32_t s32_size;
91 };
92};
94#endif
95
96/*============================ GLOBAL VARIABLES ==============================*/
97/*============================ LOCAL VARIABLES ===============================*/
98/*============================ PROTOTYPES ====================================*/
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif
105/* 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
union vsf_mem_t::@967 ptr
uint8_t * buffer_ptr
stream buffer
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