Added icon.h
This commit is contained in:
36
CMakeLists.txt
Normal file
36
CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
set(headers
|
||||||
|
src/icon.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(sources
|
||||||
|
)
|
||||||
|
|
||||||
|
set(dependencies
|
||||||
|
cpputils
|
||||||
|
espchrono
|
||||||
|
espcpputils
|
||||||
|
expected
|
||||||
|
fmt
|
||||||
|
|
||||||
|
TFT_eSPI
|
||||||
|
)
|
||||||
|
|
||||||
|
idf_component_register(
|
||||||
|
INCLUDE_DIRS
|
||||||
|
src
|
||||||
|
SRCS
|
||||||
|
${headers}
|
||||||
|
${sources}
|
||||||
|
REQUIRES
|
||||||
|
${dependencies}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(${COMPONENT_TARGET}
|
||||||
|
PRIVATE
|
||||||
|
-fstack-reuse=all
|
||||||
|
-fstack-protector-all
|
||||||
|
-Wno-unused-function
|
||||||
|
-Wno-deprecated-declarations
|
||||||
|
-Wno-missing-field-initializers
|
||||||
|
-Wno-parentheses
|
||||||
|
)
|
13
src/icon.h
Normal file
13
src/icon.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// system includes
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
template<uint16_t width, uint16_t height>
|
||||||
|
struct Icon
|
||||||
|
{
|
||||||
|
static constexpr auto WIDTH=width;
|
||||||
|
static constexpr auto HEIGHT=height;
|
||||||
|
|
||||||
|
const unsigned short buffer[width*height];
|
||||||
|
};
|
Reference in New Issue
Block a user