mbed-os
Dependents: cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more
hal/buffer.h@0:b74591d5ab33, 2017-12-11 (annotated)
- Committer:
- be_bryan
- Date:
- Mon Dec 11 17:54:04 2017 +0000
- Revision:
- 0:b74591d5ab33
motor ++
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
be_bryan | 0:b74591d5ab33 | 1 | |
be_bryan | 0:b74591d5ab33 | 2 | /** \addtogroup hal */ |
be_bryan | 0:b74591d5ab33 | 3 | /** @{*/ |
be_bryan | 0:b74591d5ab33 | 4 | /* mbed Microcontroller Library |
be_bryan | 0:b74591d5ab33 | 5 | * Copyright (c) 2014-2015 ARM Limited |
be_bryan | 0:b74591d5ab33 | 6 | * |
be_bryan | 0:b74591d5ab33 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
be_bryan | 0:b74591d5ab33 | 8 | * you may not use this file except in compliance with the License. |
be_bryan | 0:b74591d5ab33 | 9 | * You may obtain a copy of the License at |
be_bryan | 0:b74591d5ab33 | 10 | * |
be_bryan | 0:b74591d5ab33 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
be_bryan | 0:b74591d5ab33 | 12 | * |
be_bryan | 0:b74591d5ab33 | 13 | * Unless required by applicable law or agreed to in writing, software |
be_bryan | 0:b74591d5ab33 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
be_bryan | 0:b74591d5ab33 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
be_bryan | 0:b74591d5ab33 | 16 | * See the License for the specific language governing permissions and |
be_bryan | 0:b74591d5ab33 | 17 | * limitations under the License. |
be_bryan | 0:b74591d5ab33 | 18 | */ |
be_bryan | 0:b74591d5ab33 | 19 | #ifndef MBED_BUFFER_H |
be_bryan | 0:b74591d5ab33 | 20 | #define MBED_BUFFER_H |
be_bryan | 0:b74591d5ab33 | 21 | |
be_bryan | 0:b74591d5ab33 | 22 | #include <stddef.h> |
be_bryan | 0:b74591d5ab33 | 23 | |
be_bryan | 0:b74591d5ab33 | 24 | /** Generic buffer structure |
be_bryan | 0:b74591d5ab33 | 25 | */ |
be_bryan | 0:b74591d5ab33 | 26 | typedef struct buffer_s { |
be_bryan | 0:b74591d5ab33 | 27 | void *buffer; /**< the pointer to a buffer */ |
be_bryan | 0:b74591d5ab33 | 28 | size_t length; /**< the buffer length */ |
be_bryan | 0:b74591d5ab33 | 29 | size_t pos; /**< actual buffer position */ |
be_bryan | 0:b74591d5ab33 | 30 | uint8_t width; /**< The buffer unit width (8, 16, 32, 64), used for proper *buffer casting */ |
be_bryan | 0:b74591d5ab33 | 31 | } buffer_t; |
be_bryan | 0:b74591d5ab33 | 32 | |
be_bryan | 0:b74591d5ab33 | 33 | #endif |
be_bryan | 0:b74591d5ab33 | 34 | |
be_bryan | 0:b74591d5ab33 | 35 | /** @}*/ |