From e7cc4cd57f2c119a5b3accfe9eeeb98bc0b7249f Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 27 Feb 2023 23:31:23 -0800 Subject: [PATCH] Use MUSY_DEBUG for debug prints Former-commit-id: 07e9934d0aced2173c37244382b1f79df71ba71d --- src/musyx/runtime/hardware.c | 2 -- src/musyx/runtime/hw_aramdma.c | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/musyx/runtime/hardware.c b/src/musyx/runtime/hardware.c index f57e4e6a..05ffd9ba 100644 --- a/src/musyx/runtime/hardware.c +++ b/src/musyx/runtime/hardware.c @@ -1,8 +1,6 @@ #include "musyx/musyx_priv.h" -extern void OSReport(const char*, ...); - extern void DCStoreRange(void* addr, u32 nBytes); static volatile const u16 itdOffTab[128] = { diff --git a/src/musyx/runtime/hw_aramdma.c b/src/musyx/runtime/hw_aramdma.c index c63e50d9..386817f4 100644 --- a/src/musyx/runtime/hw_aramdma.c +++ b/src/musyx/runtime/hw_aramdma.c @@ -138,9 +138,7 @@ void aramInit(unsigned long length) { aramWrite = aramBase + sizeof(s16) * 640; aramUploadCallback = NULL; InitStreamBuffers(); -#if _DEBUG - OSReport("MusyX ARAM handler initialized\n"); -#endif + MUSY_DEBUG("MusyX ARAM handler initialized\n"); } void aramExit() {} @@ -259,9 +257,7 @@ unsigned char aramAllocateStreamBuffer(unsigned long len) { } if (oSb == NULL) { -#if _DEBUG - OSReport("No stream buffer slots available or ARAM.\n\n"); -#endif + MUSY_DEBUG("No stream buffer slots available or ARAM.\n\n"); return 0xFF; } @@ -285,7 +281,7 @@ void aramFreeStreamBuffer(unsigned char id) { struct STREAM_BUFFER* lastSb; // r29 struct STREAM_BUFFER* nextSb; // r27 unsigned long minAddr; // r28 - + MUSY_ASSERT_MSG(id != 0xFF, "Stream buffer ID is invalid"); fSb = &aramStreamBuffers[id]; lastSb = NULL;