From ee43b5f7c03bc9ca6ce891be4b916653e1408b49 Mon Sep 17 00:00:00 2001 From: Polprzewodnikowy Date: Sat, 22 Jan 2022 01:25:48 +0100 Subject: [PATCH] little cleanup --- sw/n64/src/boot.c | 1 - sw/n64/src/exception.c | 2 +- sw/riscv/src/dd.c | 3 +-- sw/riscv/src/usb.c | 7 +++++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sw/n64/src/boot.c b/sw/n64/src/boot.c index 345ddc1..ed4f61c 100644 --- a/sw/n64/src/boot.c +++ b/sw/n64/src/boot.c @@ -1,6 +1,5 @@ #include "boot.h" #include "crc32.h" -#include "init.h" #include "io.h" diff --git a/sw/n64/src/exception.c b/sw/n64/src/exception.c index d6331a4..927f722 100644 --- a/sw/n64/src/exception.c +++ b/sw/n64/src/exception.c @@ -258,7 +258,7 @@ void exception_fatal_handler (uint32_t exception_code, uint32_t interrupt_mask, exception_init_screen(); - exception_print("----- SummerCart64 n64boot -----\n"); + exception_print("----- n64boot SummerCart64 -----\n"); exception_print("branch: %s\n", version->git_branch); exception_print("tag: %s\n", version->git_tag); exception_print("sha: %s\n\n", version->git_sha); diff --git a/sw/riscv/src/dd.c b/sw/riscv/src/dd.c index c4c3985..f8b1aee 100644 --- a/sw/riscv/src/dd.c +++ b/sw/riscv/src/dd.c @@ -7,8 +7,7 @@ #define DD_BUFFERS_OFFSET (SDRAM_BASE + 0x03BC0000UL) #define DD_THB_TABLE_OFFSET (DD_BUFFERS_OFFSET + 0x0000) -#define DD_USB_BUFFER_OFFSET (DD_BUFFERS_OFFSET + 0x5000) -#define DD_BLOCK_BUFFER_OFFSET (DD_USB_BUFFER_OFFSET + 0x10) +#define DD_BLOCK_BUFFER_OFFSET (DD_BUFFERS_OFFSET + 0x5000) #define USB_DEBUG_ID_DD_BLOCK (0xF5) diff --git a/sw/riscv/src/usb.c b/sw/riscv/src/usb.c index 19014f7..ae0add6 100644 --- a/sw/riscv/src/usb.c +++ b/sw/riscv/src/usb.c @@ -251,10 +251,10 @@ void process_usb (void) { p.event.callback(); } } - p.state = STATE_IDLE; if (p.cmd == 'L') { USB->SCR |= USB_SCR_FORCE_TX; } + p.state = STATE_IDLE; } else { p.state = STATE_RESPONSE; } @@ -292,6 +292,9 @@ void process_usb (void) { p.event.callback(); } } + if (p.cmd == 'F') { + USB->SCR |= USB_SCR_FORCE_TX; + } p.state = STATE_IDLE; } break; @@ -329,9 +332,9 @@ void process_usb (void) { if (p.event.callback != NULL) { p.event_callback_pending = true; } + USB->SCR |= USB_SCR_FORCE_TX; p.event_pending = false; p.state = STATE_IDLE; - USB->SCR |= USB_SCR_FORCE_TX; } break; }