diff --git a/src/globals.hh b/src/globals.hh index a77e91c..74620dd 100644 --- a/src/globals.hh +++ b/src/globals.hh @@ -4,11 +4,9 @@ #include #include "daisy_seed.h" #include "daisysp.h" +#include "types.hh" namespace Heck { - namespace ld = daisy; - namespace dsp = daisysp; - namespace Constants { namespace Hardware { constexpr int PIN_BUTTON_RECORD = 28; @@ -41,20 +39,6 @@ namespace Heck { } } // namespace Constants - // Types - using u8 = uint8_t; - using u16 = uint16_t; - using u32 = uint32_t; - using u64 = uint64_t; - - using i8 = int8_t; - using i16 = int16_t; - using i32 = int32_t; - using i64 = int64_t; - - using f32 = float; - using f64 = double; - //Hardware extern ld::DaisySeed hw; extern ld::Switch but_rec; diff --git a/src/types.hh b/src/types.hh new file mode 100644 index 0000000..b6a9da0 --- /dev/null +++ b/src/types.hh @@ -0,0 +1,28 @@ +#ifndef HECK_DAISY_TYPES_HH +#define HECK_DAISY_TYPES_HH + +#include + +namespace Heck { + + // Types + using u8 = uint8_t; + using u16 = uint16_t; + using u32 = uint32_t; + using u64 = uint64_t; + + using i8 = int8_t; + using i16 = int16_t; + using i32 = int32_t; + using i64 = int64_t; + + using f32 = float; + using f64 = double; + + // namespace aliases + namespace ld = daisy; + namespace dsp = daisysp; +} // namespace Heck + + +#endif \ No newline at end of file