TinySTM  1.0.5
wrappers.h
Go to the documentation of this file.
1 /*
2  * File:
3  * wrappers.h
4  * Author(s):
5  * Pascal Felber <pascal.felber@unine.ch>
6  * Patrick Marlier <patrick.marlier@unine.ch>
7  * Description:
8  * STM wrapper functions for different data types.
9  *
10  * Copyright (c) 2007-2014.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation, version 2
15  * of the License.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * This program has a dual license and can also be distributed
23  * under the terms of the MIT license.
24  */
25 
38 #ifndef _WRAPPERS_H_
39 # define _WRAPPERS_H_
40 
41 # include <stdint.h>
42 
43 # include "stm.h"
44 
45 # ifdef __cplusplus
46 extern "C" {
47 # endif
48 
57 uint8_t stm_load_u8(volatile uint8_t *addr) _CALLCONV;
58 
67 uint16_t stm_load_u16(volatile uint16_t *addr) _CALLCONV;
68 
77 uint32_t stm_load_u32(volatile uint32_t *addr) _CALLCONV;
78 
87 uint64_t stm_load_u64(volatile uint64_t *addr) _CALLCONV;
88 
97 char stm_load_char(volatile char *addr) _CALLCONV;
98 
107 unsigned char stm_load_uchar(volatile unsigned char *addr) _CALLCONV;
108 
117 short stm_load_short(volatile short *addr) _CALLCONV;
118 
127 unsigned short stm_load_ushort(volatile unsigned short *addr) _CALLCONV;
128 
137 int stm_load_int(volatile int *addr) _CALLCONV;
138 
147 unsigned int stm_load_uint(volatile unsigned int *addr) _CALLCONV;
148 
157 long stm_load_long(volatile long *addr) _CALLCONV;
158 
167 unsigned long stm_load_ulong(volatile unsigned long *addr) _CALLCONV;
168 
177 float stm_load_float(volatile float *addr) _CALLCONV;
178 
187 double stm_load_double(volatile double *addr) _CALLCONV;
188 
197 void *stm_load_ptr(volatile void **addr) _CALLCONV;
198 
212 void stm_load_bytes(volatile uint8_t *addr, uint8_t *buf, size_t size) _CALLCONV;
213 
222 void stm_store_u8(volatile uint8_t *addr, uint8_t value) _CALLCONV;
223 
232 void stm_store_u16(volatile uint16_t *addr, uint16_t value) _CALLCONV;
233 
242 void stm_store_u32(volatile uint32_t *addr, uint32_t value) _CALLCONV;
243 
252 void stm_store_u64(volatile uint64_t *addr, uint64_t value) _CALLCONV;
253 
262 void stm_store_char(volatile char *addr, char value) _CALLCONV;
263 
272 void stm_store_uchar(volatile unsigned char *addr, unsigned char value) _CALLCONV;
273 
282 void stm_store_short(volatile short *addr, short value) _CALLCONV;
283 
292 void stm_store_ushort(volatile unsigned short *addr, unsigned short value) _CALLCONV;
293 
302 void stm_store_int(volatile int *addr, int value) _CALLCONV;
303 
312 void stm_store_uint(volatile unsigned int *addr, unsigned int value) _CALLCONV;
313 
322 void stm_store_long(volatile long *addr, long value) _CALLCONV;
323 
332 void stm_store_ulong(volatile unsigned long *addr, unsigned long value) _CALLCONV;
333 
342 void stm_store_float(volatile float *addr, float value) _CALLCONV;
343 
352 void stm_store_double(volatile double *addr, double value) _CALLCONV;
353 
362 void stm_store_ptr(volatile void **addr, void *value) _CALLCONV;
363 
376 void stm_store_bytes(volatile uint8_t *addr, uint8_t *buf, size_t size) _CALLCONV;
377 
391 void stm_set_bytes(volatile uint8_t *addr, uint8_t byte, size_t count) _CALLCONV;
392 
393 # ifdef __cplusplus
394 }
395 # endif
396 
397 #endif /* _WRAPPERS_H_ */