[mips/libsys]

- support different boards (Zwischenstand)

git-svn-id: http://moon:8086/svn/mips@66 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-08 12:42:55 +00:00
parent 1c58a2ce55
commit a67ef9649d
8 changed files with 418 additions and 266 deletions
+31 -18
View File
@@ -61,6 +61,18 @@ enum
PORT_OUT_VGA
};
#define CALC_BAUD(b) \
((uint32_t)((float)CPU_FREQ_HZ/(16*b) + 0.5f) - 1);
void UART0_setbaud(uint32_t baudrate)
{
*((uint32_t*)SYS_UART0_BAUD) = CALC_BAUD(baudrate);
}
void UART1_setbaud(uint32_t baudrate)
{
*((uint32_t*)SYS_UART1_BAUD) = CALC_BAUD(baudrate);
}
uint32_t GetPort(int file)
{
@@ -318,7 +330,7 @@ static const libsys_key_entry_t __keymap_german[] =
{0x32, 'b', 'B', 'b'},
{0x21, 'c', 'C', 'c'},
{0x23, 'd', 'D', 'd'},
{0x24, 'e', 'E', ''},
{0x24, 'e', 'E', ''},
{0x2b, 'f', 'F', 'f'},
{0x34, 'g', 'G', 'g'},
{0x33, 'h', 'H', 'h'},
@@ -326,7 +338,7 @@ static const libsys_key_entry_t __keymap_german[] =
{0x3b, 'j', 'J', 'j'},
{0x42, 'k', 'K', 'k'},
{0x4b, 'l', 'L', 'l'},
{0x3a, 'm', 'M', ''},
{0x3a, 'm', 'M', 'µ'},
{0x31, 'n', 'N', 'n'},
{0x44, 'o', 'O', 'o'},
{0x4d, 'p', 'P', 'p'},
@@ -342,7 +354,7 @@ static const libsys_key_entry_t __keymap_german[] =
{0x35, 'z', 'Z', 'z'},
{0x16, '1', '!', '1'},
{0x1e, '2', '"', '2'},
{0x26, '3', '', '3'},
{0x26, '3', '§', '3'},
{0x25, '4', '$', '4'},
{0x2e, '5', '%', '5'},
{0x36, '6', '&', '6'},
@@ -350,21 +362,22 @@ static const libsys_key_entry_t __keymap_german[] =
{0x3e, '8', '(', '['},
{0x46, '9', ')', ']'},
{0x45, '0', '=', '}'},
{0x4e, '', '?', '\\'},
{0x4e, 'ß', '?', '\\'},
{0x29, ' ', ' ', ' '},
{0x41, ',', ';', ','},
{0x49, '.', ':', '.'},
{0x4a, '-', '_', '-'},
{0x52, '', '', ''},
{0x4c, '', '', ''},
{0x54, '', '', ''},
{0x52, 'ä', 'Ä', 'ä'},
{0x4c, 'ö', 'Ö', 'ö'},
{0x54, 'ü', 'Ü', 'ü'},
{0x5a, '\n', '\n', '\n'}, //RETURN
{0x5b, '+', '*', '~'},
{0x5d, '#', '\'', '#'},
{0x0e, '^', '', '^'},
{0x0e, '^', '°', '^'},
{0x61, '<', '>', '|'},
{0x66, '\b', '\b', '\b'},
{0} //sentinel
};
static char __findkey(char scancode, int mode)
@@ -533,27 +546,27 @@ void cg_writechar(vga_if_t *pIF, char c)
// Output translation
switch(c)
{
case '':
case 'Ä':
code = 196;
break;
case '':
case 'ä':
code = 228;
break;
case '':
case 'Ö':
code = 214;
break;
case '':
case 'ö':
code = 246;
break;
case '':
case 'Ü':
code = 220;
break;
case '':
case 'ü':
code = 252;
break;
@@ -561,19 +574,19 @@ void cg_writechar(vga_if_t *pIF, char c)
code = 230;
break;
case '':
case '§':
code = 167;
break;
case '':
case 'ß':
code = 223;
break;
case '':
case '°':
code = 176;
break;
case '':
case 'µ':
code = 181;
break;