buffer.h
Go to the documentation of this file.
1 /*
2  Copyright 2012-2014 Benjamin Vedder benjamin@vedder.se
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /*
19  * buffer.h
20  *
21  * Created on: 13 maj 2013
22  * Author: benjamin
23  */
24 
25 #ifndef BUFFER_H_
26 #define BUFFER_H_
27 
28 #include <stdint.h>
29 
30 void buffer_append_int16(uint8_t* buffer, int16_t number, int32_t *index);
31 void buffer_append_uint16(uint8_t* buffer, uint16_t number, int32_t *index);
32 void buffer_append_int32(uint8_t* buffer, int32_t number, int32_t *index);
33 void buffer_append_uint32(uint8_t* buffer, uint32_t number, int32_t *index);
34 void buffer_append_float16(uint8_t* buffer, float number, float scale, int32_t *index);
35 void buffer_append_float32(uint8_t* buffer, float number, float scale, int32_t *index);
36 int16_t buffer_get_int16(const uint8_t *buffer, int32_t *index);
37 uint16_t buffer_get_uint16(const uint8_t *buffer, int32_t *index);
38 int32_t buffer_get_int32(const uint8_t *buffer, int32_t *index);
39 uint32_t buffer_get_uint32(const uint8_t *buffer, int32_t *index);
40 float buffer_get_float16(const uint8_t *buffer, float scale, int32_t *index);
41 float buffer_get_float32(const uint8_t *buffer, float scale, int32_t *index);
42 
43 #endif /* BUFFER_H_ */
void buffer_append_float16(uint8_t *buffer, float number, float scale, int32_t *index)
Definition: buffer.c:51
void buffer_append_int32(uint8_t *buffer, int32_t number, int32_t *index)
Definition: buffer.c:37
float buffer_get_float16(const uint8_t *buffer, float scale, int32_t *index)
Definition: buffer.c:91
void buffer_append_float32(uint8_t *buffer, float number, float scale, int32_t *index)
Definition: buffer.c:55
uint32_t buffer_get_uint32(const uint8_t *buffer, int32_t *index)
Definition: buffer.c:82
void buffer_append_int16(uint8_t *buffer, int16_t number, int32_t *index)
Definition: buffer.c:27
int16_t buffer_get_int16(const uint8_t *buffer, int32_t *index)
Definition: buffer.c:59
void buffer_append_uint32(uint8_t *buffer, uint32_t number, int32_t *index)
Definition: buffer.c:44
uint16_t buffer_get_uint16(const uint8_t *buffer, int32_t *index)
Definition: buffer.c:66
float buffer_get_float32(const uint8_t *buffer, float scale, int32_t *index)
Definition: buffer.c:95
void buffer_append_uint16(uint8_t *buffer, uint16_t number, int32_t *index)
Definition: buffer.c:32
int32_t buffer_get_int32(const uint8_t *buffer, int32_t *index)
Definition: buffer.c:73