mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 13:27:40 +00:00
Move _KiB and _MiB user-defined literals to utility.hpp.
Where I put all the stuff I don't know where to put.
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "lpc43xx_cpp.hpp"
|
||||
using namespace lpc43xx;
|
||||
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace portapack {
|
||||
namespace memory {
|
||||
|
||||
@@ -58,14 +60,6 @@ private:
|
||||
const size_t size_;
|
||||
};
|
||||
|
||||
constexpr size_t operator "" _KiB(unsigned long long v) {
|
||||
return v * 1024;
|
||||
}
|
||||
|
||||
constexpr size_t operator "" _MiB(unsigned long long v) {
|
||||
return v * 1024 * 1024;
|
||||
}
|
||||
|
||||
namespace map {
|
||||
|
||||
constexpr region_t local_sram_0 { 0x10000000, 96_KiB };
|
||||
|
Reference in New Issue
Block a user