ao486: 3mbit for high speed UART mode.

This commit is contained in:
sorgelig
2020-08-04 05:54:57 +08:00
parent f320a94ee3
commit ba79d13239
3 changed files with 9 additions and 1 deletions

View File

@@ -956,3 +956,8 @@ void x86_set_fdd_boot(uint32_t boot)
{
boot_from_floppy = (boot != 0);
}
void x86_set_uart_mode(int mode)
{
dma_sdio(mode ? 0x40 : 0x80);
}

View File

@@ -9,5 +9,6 @@ void x86_set_image(int num, char *filename);
void x86_config_load();
void x86_config_save();
void x86_set_fdd_boot(uint32_t boot);
void x86_set_uart_mode(int mode);
#endif

View File

@@ -567,8 +567,10 @@ int GetUARTMode()
void SetUARTMode(int mode)
{
if (is_x86()) x86_set_uart_mode(mode != 3);
MakeFile("/tmp/CORENAME", user_io_get_core_name_ex());
MakeFile("/tmp/UART_SPEED", is_st() ? "19200" : (is_x86() && (user_io_8bit_set_status(0, 0, 0) & (1 << 10))) ? "1152000" : "115200");
MakeFile("/tmp/UART_SPEED", is_st() ? "19200" : (is_x86() && (user_io_8bit_set_status(0, 0, 0) & (1 << 10))) ? "4000000" : "115200");
char cmd[32];
sprintf(cmd, "uartmode %d", mode & 0xFF);