Mbed OS Reference
Loading...
Searching...
No Matches
buffer.h
1
2/** \addtogroup hal */
3/** @{*/
4/* mbed Microcontroller Library
5 * Copyright (c) 2014-2015 ARM Limited
6 * SPDX-License-Identifier: Apache-2.0
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20#ifndef MBED_BUFFER_H
21#define MBED_BUFFER_H
22
23#include <stddef.h>
24
25/** Generic buffer structure
26 */
27typedef struct buffer_s {
28 void *buffer; /**< the pointer to a buffer */
29 size_t length; /**< the buffer length */
30 size_t pos; /**< actual buffer position */
31 uint8_t width; /**< The buffer unit width (8, 16, 32, 64), used for proper *buffer casting */
33
34#endif
35
36/** @}*/
struct buffer_s buffer_t
Generic buffer structure.
Generic buffer structure.
Definition: buffer.h:27
uint8_t width
The buffer unit width (8, 16, 32, 64), used for proper *buffer casting.
Definition: buffer.h:31
void * buffer
the pointer to a buffer
Definition: buffer.h:28
size_t pos
actual buffer position
Definition: buffer.h:30
size_t length
the buffer length
Definition: buffer.h:29