Reduce nRF52 infrastructure flash usage without trimming sensors
Keep Companion and Terminal Chat profiles unchanged; retain full-sensor and reduced-sensor OTA builds. Add compact crypto and OTA names, qualified display asset compression, font license packaging, and scope regression tests.
This commit is contained in:
1 parent
010374d7db
commit
8a69e73226
44 files changed
+11150
-14
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
/* Minimal host-only Arduino surface for exercising the real OLED renderer. */
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#define PROGMEM
|
||||
#define pgm_read_byte(address) (*reinterpret_cast<const uint8_t *>(address))
|
||||
|
||||
template <typename A, typename B>
|
||||
inline auto min(A a, B b) -> decltype(a + b) { return a < b ? a : b; }
|
||||
template <typename A, typename B>
|
||||
inline auto max(A a, B b) -> decltype(a + b) { return a > b ? a : b; }
|
||||
|
||||
inline void yield() {}
|
||||
|
||||
class String {
|
||||
std::string value;
|
||||
public:
|
||||
String(const char *text) : value(text ? text : "") {}
|
||||
const char *c_str() const { return value.c_str(); }
|
||||
unsigned int length() const { return static_cast<unsigned int>(value.size()); }
|
||||
void toCharArray(char *target, unsigned int capacity, unsigned int index = 0) const {
|
||||
if (!capacity) return;
|
||||
const size_t available = index < value.size() ? value.size() - index : 0;
|
||||
const size_t copied = std::min<size_t>(capacity - 1, available);
|
||||
std::memcpy(target, value.data() + std::min<size_t>(index, value.size()), copied);
|
||||
target[copied] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
class Print {
|
||||
public:
|
||||
virtual ~Print() {}
|
||||
virtual size_t write(uint8_t byte) = 0;
|
||||
};
|
||||
Reference in new issue
Block a user