LPC8xx用シリアルコンソール
Revision | 8 (tree) |
---|---|
Time | 2018-04-10 03:49:26 |
Author | kmorimatsu |
Update trunk
@@ -6,7 +6,7 @@ | ||
6 | 6 | */ |
7 | 7 | |
8 | 8 | /* |
9 | - * 'vsyncture' is set to get proper video signal construction frequency. | |
9 | + * 'vsynctune' is set to get proper video signal construction frequency. | |
10 | 10 | * -4 <= vsynctune <= 4 |
11 | 11 | * After setting proper value, signal frequency of Pin #3 will be 16275 Hz. |
12 | 12 | * |
@@ -21,3 +21,11 @@ | ||
21 | 21 | |
22 | 22 | #define KEYBOARD101 |
23 | 23 | //#define KEYBOARD106 |
24 | + | |
25 | +/* | |
26 | + * Baud rate definition | |
27 | + * (experimental and not tested) | |
28 | + * | |
29 | + */ | |
30 | + | |
31 | +#define BAUDRATE 9600 |
@@ -3,7 +3,7 @@ | ||
3 | 3 | extern const unsigned char cgrom[]; |
4 | 4 | |
5 | 5 | void ntsc_init(void); |
6 | -volatile int g_videoline; | |
6 | +extern volatile int g_videoline; | |
7 | 7 | |
8 | 8 | inline void check_ps2(void); |
9 | 9 | inline void completed_ps2(void); |
@@ -127,8 +127,8 @@ | ||
127 | 127 | 0x00,0x63,0x78,0x64,0x65,0x34,0x33,0x00,0x00,0x20,0x76,0x66,0x74,0x72,0x35,0x00, |
128 | 128 | 0x00,0x6e,0x62,0x68,0x67,0x79,0x36,0x00,0x00,0x00,0x6d,0x6a,0x75,0x37,0x38,0x00, |
129 | 129 | 0x00,0x2c,0x6b,0x69,0x6f,0x30,0x39,0x00,0x00,0x2e,0x2f,0x6c,0x3b,0x70,0x2d,0x00, |
130 | - 0x00,0x00,0x3a,0x00,0x40,0x5e,0x00,0x00,0x00,0x00,0x0a,0x5b,0x00,0x5d,0x00,0x00, | |
131 | - 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00, | |
130 | + 0x00,0x5c,0x3a,0x00,0x40,0x5e,0x00,0x00,0x00,0x00,0x0a,0x5b,0x00,0x5d,0x00,0x00, | |
131 | + 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x5c,0x11,0x00,0x00,0x00,0x00, | |
132 | 132 | 0x00,0x7f,0x14,0x00,0x13,0x12,0x1b,0x00,0x00,0x2b,0x00,0x2d,0x2a,0x00,0x00,0x00, |
133 | 133 | // Shift key down |
134 | 134 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x7e,0x00, |
@@ -135,9 +135,9 @@ | ||
135 | 135 | 0x00,0x00,0x00,0x00,0x00,0x51,0x21,0x00,0x00,0x00,0x5a,0x53,0x41,0x57,0x22,0x00, |
136 | 136 | 0x00,0x43,0x58,0x44,0x45,0x24,0x23,0x00,0x00,0x20,0x56,0x46,0x54,0x52,0x25,0x00, |
137 | 137 | 0x00,0x4e,0x42,0x48,0x47,0x59,0x26,0x00,0x00,0x00,0x4d,0x4a,0x55,0x27,0x28,0x00, |
138 | - 0x00,0x3c,0x4b,0x49,0x4f,0x7e,0x29,0x00,0x00,0x3e,0x3f,0x4c,0x2b,0x50,0x3d,0x00, | |
139 | - 0x00,0x00,0x3a,0x00,0x60,0x5f,0x00,0x00,0x00,0x00,0x0a,0x7b,0x00,0x7d,0x00,0x00, | |
140 | - 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00, | |
138 | + 0x00,0x3c,0x4b,0x49,0x4f,0x00,0x29,0x00,0x00,0x3e,0x3f,0x4c,0x2b,0x50,0x3d,0x00, | |
139 | + 0x00,0x5f,0x2a,0x00,0x60,0x7e,0x00,0x00,0x00,0x00,0x0a,0x7b,0x00,0x7d,0x00,0x00, | |
140 | + 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x7c,0x11,0x00,0x00,0x00,0x00, | |
141 | 141 | 0x00,0x7f,0x14,0x00,0x13,0x12,0x1b,0x00,0x00,0x2b,0x00,0x2d,0x2a,0x00,0x00,0x00, |
142 | 142 | #endif |
143 | 143 | }; |
@@ -7,9 +7,13 @@ | ||
7 | 7 | |
8 | 8 | #include "LPC8xx.h" |
9 | 9 | #include "./prototypes.h" |
10 | +#include "./config.h" | |
10 | 11 | |
11 | 12 | #define TXBUFF_SIZE 16 |
12 | -#define BAUDRATE 9600 | |
13 | +#ifndef BAUDRATE | |
14 | + // Note: Baudrate must be defined in config.h. | |
15 | + #define BAUDRATE 9600 | |
16 | +#endif | |
13 | 17 | #define SYSCLK 24000000 |
14 | 18 | #define DATA_LENG_8 (1<<2) |
15 | 19 | #define PARITY_NONE (0<<4) |