From 4c831539a8b4818edaa99bc9cdf3a43faedd603b Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Mon, 22 May 2023 13:26:37 +0100 Subject: [PATCH] Add ifdefs for CSR in note header and source --- demo/note | 2 ++ demo/note.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/demo/note b/demo/note index df43a78..e8b3eb2 100644 --- a/demo/note +++ b/demo/note @@ -4,8 +4,10 @@ // Function Definition +#ifdef CSR_AUDIO_BASE void note(uint32_t frequency, unsigned int duration_ms); void wave(uint32_t wave); +#endif // Notes diff --git a/demo/note.cpp b/demo/note.cpp index e89c69d..dd8d0ce 100644 --- a/demo/note.cpp +++ b/demo/note.cpp @@ -1,6 +1,7 @@ #include #include +#ifdef CSR_AUDIO_BASE void note(uint32_t frequency, unsigned int duration_ms) { audio_targ0_write(frequency); busy_wait(duration_ms); @@ -10,3 +11,4 @@ void note(uint32_t frequency, unsigned int duration_ms) { void wave(uint32_t wave) { audio_wave0_write(wave); } +#endif