Browse Source

Add 'types.hh' - move stuff from globals there

main
heck 9 months ago
parent
commit
6eb4111a77
  1. 18
      src/globals.hh
  2. 28
      src/types.hh

18
src/globals.hh

@ -4,11 +4,9 @@
#include <cstdint>
#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;

28
src/types.hh

@ -0,0 +1,28 @@
#ifndef HECK_DAISY_TYPES_HH
#define HECK_DAISY_TYPES_HH
#include <cstdint>
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
Loading…
Cancel
Save