diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/system.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/firmware/system.h b/firmware/system.h index 88c8449df4..8ffc7547b7 100644 --- a/firmware/system.h +++ b/firmware/system.h | |||
@@ -19,7 +19,8 @@ | |||
19 | 19 | ||
20 | #ifndef __SYSTEM_H__ | 20 | #ifndef __SYSTEM_H__ |
21 | #define __SYSTEM_H__ | 21 | #define __SYSTEM_H__ |
22 | #include <sh7034.h> | 22 | |
23 | #include "sh7034.h" | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * 11.059,200 MHz => 90.4224537037037037037037037037037... ns | 26 | * 11.059,200 MHz => 90.4224537037037037037037037037037... ns |
@@ -32,6 +33,21 @@ | |||
32 | //#define PHI ((int)(11.059200 MHz)) | 33 | //#define PHI ((int)(11.059200 MHz)) |
33 | //#define BAUDRATE 115200 /* 115200 - 9600 */ | 34 | //#define BAUDRATE 115200 /* 115200 - 9600 */ |
34 | 35 | ||
36 | #ifdef LITTLE_ENDIAN | ||
37 | #define SWAB16(x) (x) | ||
38 | #define SWAB32(x) (x) | ||
39 | #else | ||
40 | #define SWAB16(x) \ | ||
41 | (((x & 0x00ff) << 8) | \ | ||
42 | ((x & 0xff00) >> 8)) | ||
43 | |||
44 | #define SWAB32(x) \ | ||
45 | (((x & 0x000000ff) << 24) | \ | ||
46 | ((x & 0x0000ff00) << 8) | \ | ||
47 | ((x & 0x00ff0000) >> 8) | \ | ||
48 | ((x & 0xff000000) >> 24)) | ||
49 | #endif | ||
50 | |||
35 | #define nop \ | 51 | #define nop \ |
36 | asm volatile ("nop") | 52 | asm volatile ("nop") |
37 | 53 | ||