diff --git a/apps/code/script.h b/apps/code/script.h index 1a6a04bc2..da37f9ef0 100644 --- a/apps/code/script.h +++ b/apps/code/script.h @@ -1,7 +1,7 @@ #ifndef CODE_SCRIPT_H #define CODE_SCRIPT_H -#include +#include namespace Code { diff --git a/apps/code/script_node_cell.cpp b/apps/code/script_node_cell.cpp index 869daf3b0..771d83c36 100644 --- a/apps/code/script_node_cell.cpp +++ b/apps/code/script_node_cell.cpp @@ -1,6 +1,6 @@ #include "script_node_cell.h" #include -#include +#include namespace Code { diff --git a/escher/Makefile b/escher/Makefile index dc427a3cb..6723110b5 100644 --- a/escher/Makefile +++ b/escher/Makefile @@ -26,7 +26,6 @@ objs += $(addprefix escher/src/,\ image_view.o\ invocation.o\ input_view_controller.o\ - kallax.o\ key_view.o\ list_view_data_source.o\ message_table_cell.o\ @@ -43,7 +42,6 @@ objs += $(addprefix escher/src/,\ modal_view_controller.o\ palette.o\ pointer_text_view.o\ - record.o\ responder.o\ run_loop.o\ scroll_view.o\ diff --git a/escher/include/escher.h b/escher/include/escher.h index e518ff3ce..9a31e8d8c 100644 --- a/escher/include/escher.h +++ b/escher/include/escher.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -47,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/ion/Makefile b/ion/Makefile index c4d8b0e9a..61d317d19 100644 --- a/ion/Makefile +++ b/ion/Makefile @@ -18,6 +18,8 @@ ion/src/shared/software_version.o: SFLAGS += -DPATCH_LEVEL="$(call initializer_l objs += $(addprefix ion/src/shared/, \ events.o \ + kallax.o \ + record.o \ software_version.o \ ) diff --git a/ion/include/ion.h b/ion/include/ion.h index 772853557..a066c24ef 100644 --- a/ion/include/ion.h +++ b/ion/include/ion.h @@ -7,9 +7,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include diff --git a/escher/include/escher/kallax.h b/ion/include/ion/kallax.h similarity index 80% rename from escher/include/escher/kallax.h rename to ion/include/ion/kallax.h index a6e85f7bd..507a8ca08 100644 --- a/escher/include/escher/kallax.h +++ b/ion/include/ion/kallax.h @@ -1,7 +1,7 @@ -#ifndef ESCHER_KALLAX_H -#define ESCHER_KALLAX_H +#ifndef ION_KALLAX_H +#define ION_KALLAX_H -#include +#include /* Kallax : | Magic | Record1 | Record2 | ... | MagicĀ | * | Magic | Size1 | Type1 | Name1 | BodySize1 | Body1 | Size2 | Type2 | Name2 | BodySize2 | Body2 | ... | Magic */ @@ -37,18 +37,5 @@ private: uint32_t m_dataFooter; }; -class KallaxInfo { -public: - constexpr KallaxInfo(uint32_t address) : - m_header(Magic), - m_address(address), - m_footer(Magic) { } -private: - constexpr static uint32_t Magic = 0xDECB0DF0; - uint32_t m_header; - uint32_t m_address; - uint32_t m_footer; -}; - #endif diff --git a/escher/include/escher/record.h b/ion/include/ion/record.h similarity index 95% rename from escher/include/escher/record.h rename to ion/include/ion/record.h index f1adebfbd..ab5091a65 100644 --- a/escher/include/escher/record.h +++ b/ion/include/ion/record.h @@ -1,5 +1,5 @@ -#ifndef ESCHER_RECORD_H -#define ESCHER_RECORD_H +#ifndef ION_RECORD_H +#define ION_RECORD_H #include #include diff --git a/ion/src/device/Makefile b/ion/src/device/Makefile index 40611006d..69b39c342 100644 --- a/ion/src/device/Makefile +++ b/ion/src/device/Makefile @@ -1,7 +1,7 @@ include ion/src/device/boot/Makefile include ion/src/device/bench/Makefile -escher/src/kallax.o: SFLAGS += -DHEADER_SECTION="__attribute__((section(\".header\")))" -DFORCE_LINK="__attribute__((used))" +ion/src/device/kallax_info.o: SFLAGS += -DHEADER_SECTION="__attribute__((section(\".header\")))" -DFORCE_LINK="__attribute__((used))" ion/src/shared/software_version.o: SFLAGS += -DHEADER_SECTION="__attribute__((section(\".header\")))" @@ -21,6 +21,7 @@ objs += $(addprefix ion/src/device/, \ display.o\ events_keyboard.o\ fcc_id.o\ + kallax_info.o\ keyboard.o\ led.o\ power.o\ diff --git a/ion/src/device/kallax_info.cpp b/ion/src/device/kallax_info.cpp new file mode 100644 index 000000000..442d25c3e --- /dev/null +++ b/ion/src/device/kallax_info.cpp @@ -0,0 +1,12 @@ +#include "kallax_info.h" + +#ifndef HEADER_SECTION +#define HEADER_SECTION +#endif + +#ifndef FORCE_LINK +#define FORCE_LINK +#endif + +extern Kallax f; +constexpr KallaxInfo HEADER_SECTION FORCE_LINK kallax_infos((uint32_t)(&f)); diff --git a/ion/src/device/kallax_info.h b/ion/src/device/kallax_info.h new file mode 100644 index 000000000..c2d508e0c --- /dev/null +++ b/ion/src/device/kallax_info.h @@ -0,0 +1,20 @@ +#ifndef ION_DEVICE_KALLAX_INFO_H +#define ION_DEVICE_KALLAX_INFO_H + +#include + +class KallaxInfo { +public: + constexpr KallaxInfo(uint32_t address) : + m_header(Magic), + m_address(address), + m_footer(Magic) { } +private: + constexpr static uint32_t Magic = 0xDECB0DF0; + uint32_t m_header; + uint32_t m_address; + uint32_t m_footer; +}; + +#endif + diff --git a/escher/src/kallax.cpp b/ion/src/shared/kallax.cpp similarity index 97% rename from escher/src/kallax.cpp rename to ion/src/shared/kallax.cpp index e0300bf0d..2a7f50656 100644 --- a/escher/src/kallax.cpp +++ b/ion/src/shared/kallax.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -11,7 +11,6 @@ #endif Kallax f; -constexpr KallaxInfo HEADER_SECTION FORCE_LINK kallax_infos((uint32_t)(&f)); Kallax::Kallax() : m_dataHeader(Magic), diff --git a/escher/src/record.cpp b/ion/src/shared/record.cpp similarity index 96% rename from escher/src/record.cpp rename to ion/src/shared/record.cpp index dc56ca470..8c818acaa 100644 --- a/escher/src/record.cpp +++ b/ion/src/shared/record.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include