Implemented flash string
This commit is contained in:
parent
1bf2a07bc3
commit
b0f602b3be
12
flash.hpp
12
flash.hpp
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define F(str) (reinterpret_cast<const detail::FlashString *>(PSTR(str)))
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Only used for C++ type safety, because otherwise a PSTR would be indistinguishable from a normal c-string
|
||||
struct FlashString;
|
||||
|
||||
} // namespace detail
|
Loading…
Reference in New Issue
Block a user