From 03ba1dc5c4b675d5ab7704c8722b99d5bb8dd0d6 Mon Sep 17 00:00:00 2001 From: heck Date: Fri, 13 Sep 2024 21:30:30 +0200 Subject: [PATCH] globals.hh - Add hardware definitions section --- src/globals.hh | 5 +++++ src/main_perkons.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/globals.hh b/src/globals.hh index fd86788..3b6a60f 100644 --- a/src/globals.hh +++ b/src/globals.hh @@ -10,6 +10,11 @@ namespace Heck { namespace dsp = daisysp; namespace Constants { + namespace Hardware { + constexpr int PIN_BUTTON_RECORD = 28; + + } + constexpr int BUFFERSIZE = 4; constexpr int SAMPLERATE = 48000; constexpr int TRACK_COUNT = 4; diff --git a/src/main_perkons.cc b/src/main_perkons.cc index f88e14c..271a72c 100644 --- a/src/main_perkons.cc +++ b/src/main_perkons.cc @@ -200,7 +200,7 @@ namespace Heck { hw.Init(); hw.StartLog(Constants::Developer::BOOT_WAIT_FOR_LOG); - but_rec.Init(hw.GetPin(28), 0); + but_rec.Init(hw.GetPin(Constants::Hardware::PIN_BUTTON_RECORD), 0); hw.PrintLine("Setting Blocksize: %i", Constants::BUFFERSIZE); hw.SetAudioBlockSize(Constants::BUFFERSIZE);