ChibiOS/HAL 9.0.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 */
56
57/**
58 * @extends BaseBufferedStream
59 *
60 * @brief Null stream object.
61 */
62typedef struct {
63 /** @brief Virtual Methods Table.*/
64 const struct NullStreamVMT *vmt;
67
68/*===========================================================================*/
69/* Driver macros. */
70/*===========================================================================*/
71
72/*===========================================================================*/
73/* External declarations. */
74/*===========================================================================*/
75
76#ifdef __cplusplus
77extern "C" {
78#endif
79 void nullObjectInit(NullStream *nsp);
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* NULLSTREAMS_H */
85
86/** @} */
void nullObjectInit(NullStream *nsp)
Null stream object initialization.
Definition nullstreams.c:97
#define _null_stream_data
NullStream specific data.
Definition nullstreams.h:47
#define _base_buffered_stream_methods
BaseBufferedStream specific methods.
Null stream object.
Definition nullstreams.h:62
const struct NullStreamVMT * vmt
Virtual Methods Table.
Definition nullstreams.h:64
NullStream virtual methods table.
Definition nullstreams.h:53