]>
Commit | Line | Data |
---|---|---|
534983d7 | 1 | //----------------------------------------------------------------------------- |
2 | // Hagen Fritsch - June 2010 | |
3 | // | |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of | |
6 | // the license. | |
7 | ||
8 | //----------------------------------------------------------------------------- | |
9 | // Interlib Definitions | |
10 | //----------------------------------------------------------------------------- | |
11 | ||
12 | #ifndef __COMMON_H | |
13 | #define __COMMON_H | |
14 | ||
902cb3c0 | 15 | #include <stddef.h> |
873014de | 16 | #include <stdint.h> |
902cb3c0 | 17 | #include <stdbool.h> |
18 | #include <at91sam7s512.h> | |
d19929cb | 19 | typedef unsigned char byte_t; |
873014de | 20 | |
759c16b3 | 21 | #ifndef MIN |
22 | # define MIN(a, b) (((a) < (b)) ? (a) : (b)) | |
23 | #endif | |
f2c2b174 | 24 | |
759c16b3 | 25 | #ifndef MAX |
26 | # define MAX(a, b) (((a) > (b)) ? (a) : (b)) | |
27 | #endif | |
28fdb04f | 28 | |
f2c2b174 | 29 | #ifndef ABS |
30 | # define ABS(a) ( ((a)<0) ? -(a) : (a) ) | |
31 | #endif | |
32 | ||
ce55f5a2 | 33 | #define RAMFUNC __attribute((long_call, section(".ramfunc"))) |
534983d7 | 34 | #endif |