[M] Split macros
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#ifndef FIRMWARE_MACROS_H
|
||||
#define FIRMWARE_MACROS_H
|
||||
|
||||
#define u8 uint8_t
|
||||
#define u16 uint16_t
|
||||
#define u32 uint32_t
|
||||
#define u64 uint64_t
|
||||
#define timeMillis() std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define let auto
|
||||
#define val const auto
|
||||
|
||||
#endif //FIRMWARE_MACROS_H
|
||||
@@ -1,13 +1,8 @@
|
||||
#include <Arduino.h>
|
||||
#include <chrono>
|
||||
#include <cinttypes>
|
||||
#include "macros.h"
|
||||
|
||||
#define u8 uint8_t
|
||||
#define u16 uint16_t
|
||||
#define u32 uint32_t
|
||||
#define u64 uint64_t
|
||||
#define timeMillis() std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
u64 start_time = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user