ChibiOS/HAL
7.2.0
nullstreams.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
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
* @file nullstreams.h
19
* @brief Null streams structures and macros.
20
21
* @addtogroup HAL_NULL_STREAMS
22
* @{
23
*/
24
25
#ifndef NULLSTREAMS_H
26
#define NULLSTREAMS_H
27
28
/*===========================================================================*/
29
/* Driver constants. */
30
/*===========================================================================*/
31
32
/*===========================================================================*/
33
/* Driver pre-compile time settings. */
34
/*===========================================================================*/
35
36
/*===========================================================================*/
37
/* Derived constants and error checks. */
38
/*===========================================================================*/
39
40
/*===========================================================================*/
41
/* Driver data structures and types. */
42
/*===========================================================================*/
43
44
/**
45
* @brief @p NullStream specific data.
46
*/
47
#define _null_stream_data \
48
_base_buffered_stream_data
49
50
/**
51
* @brief @p NullStream virtual methods table.
52
*/
53
struct
NullStreamVMT
{
54
_base_buffered_stream_methods
55
};
56
57
/**
58
* @extends BaseBufferedStream
59
*
60
* @brief Null stream object.
61
*/
62
typedef
struct
{
63
/** @brief Virtual Methods Table.*/
64
const
struct
NullStreamVMT
*
vmt
;
65
_null_stream_data
66
}
NullStream
;
67
68
/*===========================================================================*/
69
/* Driver macros. */
70
/*===========================================================================*/
71
72
/*===========================================================================*/
73
/* External declarations. */
74
/*===========================================================================*/
75
76
#ifdef __cplusplus
77
extern
"C"
{
78
#endif
79
void
nullObjectInit
(
NullStream
*nsp);
80
#ifdef __cplusplus
81
}
82
#endif
83
84
#endif
/* NULLSTREAMS_H */
85
86
/** @} */
NullStream::vmt
const struct NullStreamVMT * vmt
Virtual Methods Table.
Definition:
nullstreams.h:64
NullStream
Null stream object.
Definition:
nullstreams.h:62
NullStreamVMT
NullStream virtual methods table.
Definition:
nullstreams.h:53
_null_stream_data
#define _null_stream_data
NullStream specific data.
Definition:
nullstreams.h:47
_base_buffered_stream_methods
#define _base_buffered_stream_methods
BaseBufferedStream specific methods.
Definition:
hal_streams.h:157
nullObjectInit
void nullObjectInit(NullStream *nsp)
Null stream object initialization.
Definition:
nullstreams.c:97
home
giovanni
Projects
ChibiStudio
chibios_stable-21.6.x
os
hal
lib
streams
nullstreams.h
Generated on Sun Jun 13 2021 16:13:17 for ChibiOS/HAL by
1.8.17