M CMakeLists.txt => CMakeLists.txt +4 -0
@@ 156,6 156,10 @@ add_custom_target(
"Generating version info"
)
+add_library(version-header INTERFACE)
+target_include_directories(version-header INTERFACE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/source/include>)
+add_dependencies(version-header version)
+
fetch_ecoboot()
fetch_updater()
M Target_Linux.cmake => Target_Linux.cmake +1 -0
@@ 8,6 8,7 @@ set(TARGET_LIBRARIES
portaudio
CACHE INTERNAL "" )
+link_libraries(pthread rt)
option (LINUX_ENABLE_SANITIZER "Enable address sanitizer for Linux" ON)
if (LINUX_ENABLE_SANITIZER)
M Target_RT1051.cmake => Target_RT1051.cmake +2 -0
@@ 23,6 23,8 @@ set(LDSCRIPTSDIR "${CMAKE_CURRENT_LIST_DIR}/board/rt1051/ldscripts" CACHE INTERN
set(PROJECT_TARGET "TARGET_RT1051" CACHE INTERNAL "")
+include_directories(${CMAKE_SOURCE_DIR}/board/rt1051/newlib/include)
+
add_compile_definitions(
CPU_MIMXRT1051DVL6B_cm7
CPU_MIMXRT1051DVL6B
M board/CMakeLists.txt => board/CMakeLists.txt +2 -2
@@ 1,3 1,3 @@
-add_library(board STATIC)
-
+add_library(board-config INTERFACE)
add_board_subdirectory()
+target_link_libraries(board INTERFACE board-config)
M board/linux/CMakeLists.txt => board/linux/CMakeLists.txt +2 -0
@@ 1,1 1,3 @@
+add_library(board INTERFACE)
add_subdirectory(libiosyscalls)
+target_compile_definitions(board-config INTERFACE PROJECT_CONFIG_USER_DYNMEM_SIZE=0)
M board/rt1051/CMakeLists.txt => board/rt1051/CMakeLists.txt +5 -1
@@ 1,3 1,5 @@
+add_library(board STATIC)
+
add_subdirectory(cmsis)
add_subdirectory(${BOARD})
@@ 24,11 26,13 @@ target_include_directories(board
PUBLIC
$<BUILD_INTERFACE:
${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/newlib/include
>
)
target_link_libraries(board
PUBLIC
+ fsl
+ module-vfs
+ log-api
CrashCatcher::CrashCatcher
)
M board/rt1051/bellpx/CMakeLists.txt => board/rt1051/bellpx/CMakeLists.txt +2 -2
@@ 1,6 1,6 @@
target_compile_definitions(
- board
- PUBLIC
+ board-config
+ INTERFACE
PROJECT_CONFIG_USER_DYNMEM_SIZE=9*1024*1024
HW_SDRAM_64_MB=0
)
M board/rt1051/crashdump/consoledump.cpp => board/rt1051/crashdump/consoledump.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "consoledump.hpp"
#include "MIMXRT1051.h"
M board/rt1051/crashdump/crashcatcher_impl.cpp => board/rt1051/crashdump/crashcatcher_impl.cpp +1 -1
@@ 5,7 5,7 @@
#include <CrashCatcher/CrashCatcher.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <date/date.h>
#include "crashdumpwriter.hpp"
#include "consoledump.hpp"
M board/rt1051/crashdump/crashdumpwriter_vfs.cpp => board/rt1051/crashdump/crashdumpwriter_vfs.cpp +1 -1
@@ 3,7 3,7 @@
#include "crashdumpwriter_vfs.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <fcntl.h>
#include "purefs/vfs_subsystem.hpp"
M board/rt1051/puretx/CMakeLists.txt => board/rt1051/puretx/CMakeLists.txt +4 -4
@@ 1,16 1,16 @@
if (${BOARD_REVISION} EQUAL 7)
set (MEMORY_LINKER_FILE_PATH "${CMAKE_CURRENT_LIST_DIR}/memory_pure_T7.ld" CACHE INTERNAL "")
target_compile_definitions(
- board
- PUBLIC
+ board-config
+ INTERFACE
PROJECT_CONFIG_USER_DYNMEM_SIZE=28*1024*1024
HW_SDRAM_64_MB=1
)
elseif (${BOARD_REVISION} EQUAL 6)
set (MEMORY_LINKER_FILE_PATH "${CMAKE_CURRENT_LIST_DIR}/memory_pure_T6.ld" CACHE INTERNAL "")
target_compile_definitions(
- board
- PUBLIC
+ board-config
+ INTERFACE
PROJECT_CONFIG_USER_DYNMEM_SIZE=9*1024*1024
HW_SDRAM_64_MB=0
)
M cmake/modules/GenVersionHpp.cmake => cmake/modules/GenVersionHpp.cmake +1 -1
@@ 5,7 5,7 @@ list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/cmake/modules")
include(Version)
configure_file(
${SRC_DIR}/source/version.hpp.template
- ${CMAKE_BINARY_DIR}/source/version.hpp
+ ${CMAKE_BINARY_DIR}/source/include/product/version.hpp
)
message("GIT_REV: ${GIT_REV}")
M module-apps/CMakeLists.txt => module-apps/CMakeLists.txt +3 -1
@@ 84,6 84,7 @@ endif()
target_link_libraries(${PROJECT_NAME}
PRIVATE
app
+ application-calendar
application-messages
application-settings
apps-common
@@ 98,7 99,8 @@ target_link_libraries(${PROJECT_NAME}
service-cellular
service-db
service-evtmgr
- time
+ service-time-api
+ utils-time
utils-bootconfig
PUBLIC
module-audio
M module-apps/application-alarm-clock/ApplicationAlarmClock.cpp => module-apps/application-alarm-clock/ApplicationAlarmClock.cpp +1 -0
@@ 13,6 13,7 @@
#include "windows/OptionWindow.hpp"
#include <service-db/DBNotificationMessage.hpp>
#include <service-db/QueryMessage.hpp>
+#include <service-time/api/TimeSettingsApi.hpp>
namespace app
{
M module-apps/application-alarm-clock/models/AlarmsRepository.cpp => module-apps/application-alarm-clock/models/AlarmsRepository.cpp +2 -3
@@ 6,7 6,7 @@
#include <service-time/Constants.hpp>
#include "AsyncTask.hpp"
-#include "log.hpp"
+#include "log/log.hpp"
namespace app::alarmClock
{
@@ 72,6 72,5 @@ namespace app::alarmClock
}
void AlarmsDBRepository::turnOffAll(const AbstractAlarmsRepository::OnResultCallback &callback)
- {
- }
+ {}
} // namespace app::alarmClock
M module-apps/application-alarm-clock/presenter/AlarmRRulePresenter.cpp => module-apps/application-alarm-clock/presenter/AlarmRRulePresenter.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "AlarmRRulePresenter.hpp"
-#include "log.hpp"
+#include "log/log.hpp"
namespace app::alarmClock
{
M module-apps/application-alarm-clock/presenter/AlarmRRulePresenter.hpp => module-apps/application-alarm-clock/presenter/AlarmRRulePresenter.hpp +2 -2
@@ 3,11 3,11 @@
#pragma once
-#include "log.hpp"
+#include "log/log.hpp"
#include <AlarmEventRecord.hpp>
#include <time/time_locale.hpp>
-#include <rrule/rrule/rrule.hpp>
+#include <rrule/rrule.hpp>
#include <utf8/UTF8.hpp>
#include <functional>
M module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp => module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp +1 -0
@@ 7,6 7,7 @@
#include <Style.hpp>
#include <time/time_constants.hpp>
#include <time/time_date_validation.hpp>
+#include <service-time/api/TimeSettingsApi.hpp>
namespace gui
{
M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp => module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp +1 -1
@@ 4,7 4,7 @@
#include "AlarmClockMainWindow.hpp"
#include "application-alarm-clock/widgets/AlarmClockStyle.hpp"
#include "application-alarm-clock/data/AlarmsData.hpp"
-#include "log.hpp"
+#include "log/log.hpp"
#include "windows/DialogMetadata.hpp"
#include "messages/DialogMetadataMessage.hpp"
#include <InputEvent.hpp>
M module-apps/application-calculator/data/CalculatorUtility.cpp => module-apps/application-calculator/data/CalculatorUtility.cpp +1 -1
@@ 5,7 5,7 @@
#include "CalculatorUtility.hpp"
#include <widgets/CalculatorStyle.hpp>
#include <i18n/i18n.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <tinyexpr.h>
#include <cmath>
M module-apps/application-call/CMakeLists.txt => module-apps/application-call/CMakeLists.txt +1 -1
@@ 48,7 48,7 @@ target_link_libraries(application-call
service-appmgr
service-audio
service-db
- time
+ utils-time
PUBLIC
apps-common
module-sys
M module-apps/application-call/widgets/StateIcon.hpp => module-apps/application-call/widgets/StateIcon.hpp +2 -2
@@ 6,7 6,7 @@
#include <i18n/i18n.hpp>
#include <Image.hpp>
#include <Label.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Style.hpp>
#include <map>
@@ 46,7 46,7 @@ namespace gui
using IconMap = std::map<T, std::pair<const std::string, const std::string>>;
StateIcon() = delete;
StateIcon(
- Item * parent, const uint32_t &x, const uint32_t &y, const uint32_t &w_margin, T state, const IconMap &data)
+ Item *parent, const uint32_t &x, const uint32_t &y, const uint32_t &w_margin, T state, const IconMap &data)
: Rect(parent, x, y, icon::w + 2 * w_margin, icon::h), data(data)
{
setEdges(RectangleEdge::None);
M module-apps/application-call/windows/CallWindow.cpp => module-apps/application-call/windows/CallWindow.cpp +2 -2
@@ 14,7 14,7 @@
#include <InputEvent.hpp>
#include <InputMode.hpp>
#include <Label.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <magic_enum.hpp>
#include <Margins.hpp>
#include <service-appmgr/Controller.hpp>
@@ 130,7 130,7 @@ namespace gui
};
sendSmsIcon->activatedCallback = [=](gui::Item &item) {
LOG_INFO("Send message template and reject the call");
- constexpr auto preventAutoLock = true;
+ constexpr auto preventAutoLock = true;
auto msg = std::make_unique<SMSSendTemplateRequest>(phoneNumber, preventAutoLock);
msg->ignoreCurrentWindowOnStack = true;
return app::manager::Controller::sendAction(application,
M module-apps/application-calllog/ApplicationCallLog.cpp => module-apps/application-calllog/ApplicationCallLog.cpp +1 -1
@@ 13,7 13,7 @@
#include <Dialog.hpp>
#include <OptionWindow.hpp>
#include <i18n/i18n.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <MessageType.hpp>
#include <module-db/queries/calllog/QueryCalllogSetAllRead.hpp>
#include <module-db/queries/notifications/QueryNotificationsClear.hpp>
M module-apps/application-calllog/CMakeLists.txt => module-apps/application-calllog/CMakeLists.txt +1 -1
@@ 47,7 47,7 @@ target_link_libraries( application-calllog
module-utils
service-appmgr
service-db
- time
+ utils-time
PUBLIC
apps-common
module-db
M module-apps/application-clock/ApplicationClock.cpp => module-apps/application-clock/ApplicationClock.cpp +1 -1
@@ 6,7 6,7 @@
#include "gui/widgets/Window.hpp"
// module-utils
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-evtmgr/EVMessages.hpp>
#include <service-evtmgr/EventManagerCommon.hpp>
#include <Timers/TimerFactory.hpp>
M module-apps/application-desktop/CMakeLists.txt => module-apps/application-desktop/CMakeLists.txt +1 -1
@@ 67,7 67,7 @@ target_link_libraries(application-desktop
service-cellular
service-db
service-time
- time
+ utils-time
utf8
utils-bootconfig
PUBLIC
M module-apps/application-desktop/windows/ChargingBatteryWindow.cpp => module-apps/application-desktop/windows/ChargingBatteryWindow.cpp +1 -1
@@ 6,7 6,7 @@
#include "Names.hpp"
#include <gui/widgets/Image.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-appmgr/Controller.hpp>
namespace gui
M module-apps/application-desktop/windows/DeadBatteryWindow.cpp => module-apps/application-desktop/windows/DeadBatteryWindow.cpp +1 -1
@@ 7,7 7,7 @@
#include <gui/widgets/Image.hpp>
#include <Image.hpp>
#include <InputEvent.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-appmgr/Controller.hpp>
namespace gui
M module-apps/application-desktop/windows/DesktopMainWindow.cpp => module-apps/application-desktop/windows/DesktopMainWindow.cpp +4 -4
@@ 7,7 7,7 @@
#include "DesktopStyle.hpp"
#include <application-call/data/CallSwitchData.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <messages/DialogMetadataMessage.hpp>
#include <notifications/NotificationsModel.hpp>
#include <service-appmgr/Controller.hpp>
@@ 234,9 234,9 @@ namespace gui
bool DesktopMainWindow::updateTime()
{
using namespace utils::time;
- auto ret = AppWindow::updateTime();
- auto clock = TimestampFactory().createTimestamp(TimestampType::Clock, std::time(nullptr));
- auto date = TimestampFactory().createTimestamp(TimestampType::DateText, std::time(nullptr));
+ auto ret = AppWindow::updateTime();
+ auto clock = TimestampFactory().createTimestamp(TimestampType::Clock, std::time(nullptr));
+ auto date = TimestampFactory().createTimestamp(TimestampType::DateText, std::time(nullptr));
if (time != nullptr) {
time->setText(clock->str());
}
M module-apps/application-desktop/windows/LogoWindow.cpp => module-apps/application-desktop/windows/LogoWindow.cpp +1 -1
@@ 5,7 5,7 @@
#include "Names.hpp"
#include <gui/widgets/Image.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-apps/application-meditation/CMakeLists.txt => module-apps/application-meditation/CMakeLists.txt +1 -1
@@ 46,7 46,7 @@ target_link_libraries(application-meditation
module-utils
module-vfs
service-audio
- time
+ utils-time
PUBLIC
apps-common
module-gui
M module-apps/application-meditation/widgets/TimerProperty.cpp => module-apps/application-meditation/widgets/TimerProperty.cpp +1 -1
@@ 5,7 5,7 @@
#include "TimerProperty.hpp"
#include <i18n/i18n.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
using namespace gui;
M module-apps/application-messages/CMakeLists.txt => module-apps/application-messages/CMakeLists.txt +1 -1
@@ 76,7 76,7 @@ target_link_libraries(application-messages
service-appmgr
service-cellular
service-db
- time
+ utils-time
PUBLIC
apps-common
module-db
M module-apps/application-messages/models/ThreadsModel.cpp => module-apps/application-messages/models/ThreadsModel.cpp +1 -1
@@ 9,7 9,7 @@
#include <InputEvent.hpp>
#include <ListView.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <module-db/queries/messages/threads/QueryThreadsGet.hpp>
#include <module-db/queries/messages/threads/QueryThreadsGetForList.hpp>
#include <OptionsWindow.hpp>
M module-apps/application-messages/windows/MessagesMainWindow.cpp => module-apps/application-messages/windows/MessagesMainWindow.cpp +1 -1
@@ 12,7 12,7 @@
#include <header/AddElementAction.hpp>
#include <header/SearchAction.hpp>
#include <i18n/i18n.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <module-db/queries/messages/threads/QueryThreadGetByContactID.hpp>
#include <module-db/queries/notifications/QueryNotificationsClear.hpp>
#include <service-db/DBNotificationMessage.hpp>
M module-apps/application-messages/windows/SMSTemplatesWindow.cpp => module-apps/application-messages/windows/SMSTemplatesWindow.cpp +2 -2
@@ 7,7 7,7 @@
#include "SMSTemplatesWindow.hpp"
#include <i18n/i18n.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-appmgr/Controller.hpp>
#include <Style.hpp>
@@ 73,7 73,7 @@ namespace gui
void SMSTemplatesWindow::smsSendTemplateRequestHandler(const SMSSendTemplateRequest *const switchData)
{
preventsAutoLock = switchData->isAutoLockPrevented();
- auto app = dynamic_cast<app::ApplicationMessages *>(application);
+ auto app = dynamic_cast<app::ApplicationMessages *>(application);
assert(app != nullptr);
auto phoneNumber = switchData->getPhoneNumber();
M module-apps/application-messages/windows/SMSThreadViewWindow.cpp => module-apps/application-messages/windows/SMSThreadViewWindow.cpp +1 -1
@@ 6,7 6,7 @@
#include "SMSdata.hpp"
#include "SMSThreadViewWindow.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <module-db/queries/phonebook/QueryContactGetByID.hpp>
#include <OptionsMessages.hpp>
#include <service-db/DBNotificationMessage.hpp>
M module-apps/application-messages/windows/ThreadWindowOptions.cpp => module-apps/application-messages/windows/ThreadWindowOptions.cpp +1 -1
@@ 4,7 4,7 @@
#include "ThreadWindowOptions.hpp"
#include <i18n/i18n.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <OptionCall.hpp>
#include <OptionContact.hpp>
#include <OptionWindow.hpp>
M module-apps/application-music-player/ApplicationMusicPlayer.cpp => module-apps/application-music-player/ApplicationMusicPlayer.cpp +1 -1
@@ 13,7 13,7 @@
#include <service-appmgr/Controller.hpp>
#include <filesystem>
-#include <log.hpp>
+#include <log/log.hpp>
#include <i18n/i18n.hpp>
#include <purefs/filesystem_paths.hpp>
#include <service-audio/AudioServiceAPI.hpp>
M module-apps/application-music-player/CMakeLists.txt => module-apps/application-music-player/CMakeLists.txt +1 -1
@@ 43,7 43,7 @@ target_link_libraries(application-music-player
log
module-gui
service-audio
- time
+ utils-time
PUBLIC
apps-common
module-audio
M module-apps/application-music-player/models/SongsRepository.cpp => module-apps/application-music-player/models/SongsRepository.cpp +1 -1
@@ 4,7 4,7 @@
#include "SongsRepository.hpp"
#include <algorithm>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-audio/AudioServiceAPI.hpp>
#include <service-audio/AudioServiceName.hpp>
#include <time/ScopedTime.hpp>
M module-apps/application-notes/CMakeLists.txt => module-apps/application-notes/CMakeLists.txt +1 -1
@@ 63,6 63,6 @@ target_link_libraries(application-notes
module-db
service-db
log
- time
+ utils-time
i18n
)
M module-apps/application-notes/model/NotesSearchListModel.cpp => module-apps/application-notes/model/NotesSearchListModel.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "NotesSearchListModel.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace app::notes
{
M module-apps/application-onboarding/windows/UpdateDialogWindow.cpp => module-apps/application-onboarding/windows/UpdateDialogWindow.cpp +1 -1
@@ 8,7 8,7 @@
#include <application-onboarding/ApplicationOnBoarding.hpp>
#include <service-appmgr/Controller.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
namespace app::onBoarding
{
M module-apps/application-phonebook/CMakeLists.txt => module-apps/application-phonebook/CMakeLists.txt +1 -1
@@ 67,7 67,7 @@ target_link_libraries(application-phonebook
utf8
module-gui
module-utils
- time
+ utils-time
module-db
service-appmgr
service-db
M module-apps/application-settings/models/system/TechnicalInformationModel.cpp => module-apps/application-settings/models/system/TechnicalInformationModel.cpp +1 -1
@@ 8,7 8,7 @@
#include <ListView.hpp>
#include <i18n/i18n.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
TechnicalInformationModel::TechnicalInformationModel(std::unique_ptr<AbstractFactoryData> &&factoryData,
std::unique_ptr<AbstractTechnicalInformationRepository> repository)
M module-apps/application-settings/windows/advanced/InformationWindow.cpp => module-apps/application-settings/windows/advanced/InformationWindow.cpp +1 -1
@@ 6,7 6,7 @@
#include <application-settings/windows/WindowNames.hpp>
#include <service-cellular/CellularServiceAPI.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
namespace gui
{
M module-apps/apps-common/ApplicationCommon.cpp => module-apps/apps-common/ApplicationCommon.cpp +6 -6
@@ 9,12 9,12 @@
#include "Timers/TimerFactory.hpp" // for Timer
#include "StatusBar.hpp"
#include "status-bar/Time.hpp"
-#include "Translator.hpp" // for KeyInputSim...
-#include <EventStore.hpp> // for Battery
-#include "common_data/RawKey.hpp" // for RawKey, key...
+#include "Translator.hpp" // for KeyInputSim...
+#include <EventStore.hpp> // for Battery
+#include <hal/key_input/RawKey.hpp>
#include "gui/input/InputEvent.hpp" // for InputEvent
-#include "log/debug.hpp" // for DEBUG_APPLI...
-#include <log.hpp> // for LOG_INFO
+#include <log/debug.hpp> // for DEBUG_APPLI...
+#include <log/log.hpp> // for LOG_INFO
#include "messages/AppMessage.hpp" // for AppSwitchMe...
#include "service-appmgr/Controller.hpp" // for Controller
#include "actions/AlarmClockStatusChangeParams.hpp"
@@ 36,7 36,7 @@
#include <type_traits> // for add_const<>...
#include <WindowsFactory.hpp>
#include <service-gui/Common.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <service-db/Settings.hpp>
#include <service-db/agents/settings/SystemSettings.hpp>
#include <service-audio/AudioServiceAPI.hpp> // for GetOutputVolume
M module-apps/apps-common/AsyncTask.cpp => module-apps/apps-common/AsyncTask.cpp +1 -1
@@ 3,7 3,7 @@
#include "AsyncTask.hpp"
#include <apps-common/ApplicationCommon.hpp>
-#include "log.hpp"
+#include "log/log.hpp"
namespace app
{
M module-apps/apps-common/AudioOperations.cpp => module-apps/apps-common/AudioOperations.cpp +1 -1
@@ 3,7 3,7 @@
#include "AudioOperations.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-audio/AudioServiceAPI.hpp>
#include <service-audio/AudioServiceName.hpp>
#include <time/ScopedTime.hpp>
M module-apps/apps-common/CMakeLists.txt => module-apps/apps-common/CMakeLists.txt +2 -1
@@ 87,8 87,9 @@ target_link_libraries(apps-common
module-services
module-sys
module-utils
- time
+ utils-time
utf8
+ version-header
)
# Board specific compilation definitions,options,include directories and features
M module-apps/apps-common/locks/handlers/LockPolicyHandler.cpp => module-apps/apps-common/locks/handlers/LockPolicyHandler.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "LockPolicyHandler.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <ApplicationCommon.hpp>
#include <gsl/assert>
M module-apps/apps-common/locks/widgets/Lock.cpp => module-apps/apps-common/locks/widgets/Lock.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "Lock.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace locks
{
M module-apps/apps-common/notifications/NotificationsHandler.cpp => module-apps/apps-common/notifications/NotificationsHandler.cpp +1 -1
@@ 3,7 3,7 @@
#include "NotificationsHandler.hpp"
#include <service-db/DBServiceAPI.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-cellular/service-cellular/CellularMessage.hpp>
#include <service-appmgr/Controller.hpp>
#include <service-audio/AudioServiceAPI.hpp>
M => +1 -1
@@ 4,7 4,7 @@
#include "PowerOffWindow.hpp"
#include "Popups.hpp"
#include <log.hpp>
#include <log/log.hpp>
#include <messages/DialogMetadataMessage.hpp>
#include <i18n/i18n.hpp>
M module-apps/apps-common/widgets/TimeWidget.cpp => module-apps/apps-common/widgets/TimeWidget.cpp +1 -0
@@ 8,6 8,7 @@
#include <time/time_date_validation.hpp>
#include "DateAndTimeStyle.hpp"
#include <time/TimeZone.hpp>
+#include <service-time/api/TimeSettingsApi.hpp>
namespace gui
{
M module-audio/Audio/Audio.cpp => module-audio/Audio/Audio.cpp +1 -1
@@ 4,7 4,7 @@
#include "Audio.hpp"
#include "Operation/Operation.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <bsp/headset/headset.hpp>
namespace audio
M module-audio/Audio/Operation/PlaybackOperation.cpp => module-audio/Audio/Operation/PlaybackOperation.cpp +1 -1
@@ 9,7 9,7 @@
#include "Audio/AudioCommon.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace audio
{
M module-audio/Audio/Operation/RecorderOperation.cpp => module-audio/Audio/Operation/RecorderOperation.cpp +1 -1
@@ 10,7 10,7 @@
#include "Audio/Profiles/ProfileRecordingOnBoardMic.hpp"
#include "Audio/AudioCommon.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "FreeRTOS.h"
#include "task.h"
M module-audio/Audio/Operation/RouterOperation.cpp => module-audio/Audio/Operation/RouterOperation.cpp +1 -1
@@ 9,7 9,7 @@
#include <Audio/StreamFactory.hpp>
#include <Audio/transcode/TransformFactory.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <mutex.hpp>
#include <algorithm>
M module-audio/Audio/decoder/Decoder.hpp => module-audio/Audio/decoder/Decoder.hpp +1 -1
@@ 8,7 8,7 @@
#include "Audio/Stream.hpp"
#include "DecoderWorker.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <optional>
M module-audio/Audio/encoder/EncoderWAV.cpp => module-audio/Audio/encoder/EncoderWAV.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "EncoderWAV.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace audio
{
M module-audio/Audio/test/unittest_equalizer.cpp => module-audio/Audio/test/unittest_equalizer.cpp +1 -1
@@ 5,7 5,7 @@
#include <catch2/catch.hpp>
#include <module-audio/Audio/equalizer/Equalizer.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <stdexcept>
SCENARIO("Calculate filter coeff")
M module-audio/CMakeLists.txt => module-audio/CMakeLists.txt +1 -1
@@ 71,7 71,7 @@ target_link_libraries(${PROJECT_NAME}
tag
minimp3::minimp3
PRIVATE
- math
+ utils-math
tagsfetcher
)
M module-audio/board/linux/LinuxAudioDevice.cpp => module-audio/board/linux/LinuxAudioDevice.cpp +1 -1
@@ 3,7 3,7 @@
#include "LinuxAudioDevice.hpp"
#include <Audio/Stream.hpp>
-#include <module-utils/log/log.hpp>
+#include <log/log.hpp>
namespace audio
{
M module-audio/board/rt1051/RT1051AudioCodec.cpp => module-audio/board/rt1051/RT1051AudioCodec.cpp +1 -1
@@ 4,7 4,7 @@
#include "RT1051AudioCodec.hpp"
#include "board.h"
#include "dma_config.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include "board/BoardDefinitions.hpp"
#include "board/rt1051/common/audio.hpp"
M module-audio/board/rt1051/RT1051CellularAudio.cpp => module-audio/board/rt1051/RT1051CellularAudio.cpp +1 -1
@@ 4,7 4,7 @@
#include "RT1051CellularAudio.hpp"
#include "board.h"
#include "dma_config.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include "board/BoardDefinitions.hpp"
M module-audio/tags_fetcher/CMakeLists.txt => module-audio/tags_fetcher/CMakeLists.txt +0 -5
@@ 8,11 8,6 @@ target_sources(tagsfetcher
PUBLIC
TagsFetcher.hpp)
-target_include_directories(ucs2
- PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-)
-
target_link_libraries(tagsfetcher
PRIVATE
tag
M module-bluetooth/Bluetooth/BluetoothWorker.cpp => module-bluetooth/Bluetooth/BluetoothWorker.cpp +1 -1
@@ 4,7 4,7 @@
#include <service-bluetooth/ServiceBluetooth.hpp>
#include "BluetoothWorker.hpp"
#include "BtCommand.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "interface/BluetoothDriverImpl.hpp"
#include "interface/profiles/A2DP/A2DP.hpp"
#include "interface/profiles/HSP/HSP.hpp"
M module-bluetooth/Bluetooth/BtKeysStorage.cpp => module-bluetooth/Bluetooth/BtKeysStorage.cpp +2 -2
@@ 3,7 3,7 @@
#include <algorithm>
#include "BtKeysStorage.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
json11::Json bluetooth::KeyStorage::keysJson = json11::Json();
btstack_link_key_db_t bluetooth::KeyStorage::keyStorage;
@@ 151,4 151,4 @@ namespace bluetooth
}
}
-} // namespace Bt
+} // namespace bluetooth
M module-bluetooth/Bluetooth/WorkerController.cpp => module-bluetooth/Bluetooth/WorkerController.cpp +1 -1
@@ 6,7 6,7 @@
#include "Device.hpp"
#include "interface/profiles/ProfileManager.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#define BOOST_SML_CFG_DISABLE_MIN_SIZE // GCC10 fix
#include <boost/sml.hpp>
#include <magic_enum.hpp>
M module-bluetooth/Bluetooth/glucode/BluetoothRunLoop.hpp => module-bluetooth/Bluetooth/glucode/BluetoothRunLoop.hpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
-#include <log.hpp>
+#include <log/log.hpp>
#include "queue.hpp"
#include <btstack_run_loop.h>
#include <timer.hpp>
M module-bluetooth/Bluetooth/glucode/btstack_uart_block_rt1051.cpp => module-bluetooth/Bluetooth/glucode/btstack_uart_block_rt1051.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <bsp/bluetooth/Bluetooth.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
using namespace bsp;
M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp +1 -1
@@ 11,7 11,7 @@
#include "AVRCP.hpp"
#include <Bluetooth/Device.hpp>
#include <Bluetooth/Error.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-bluetooth/BluetoothMessage.hpp>
#include <Audio/AudioCommon.hpp>
#include <service-audio/AudioMessage.hpp>
M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DPImpl.hpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DPImpl.hpp +1 -1
@@ 5,7 5,7 @@
#include "A2DP.hpp"
#include <Bluetooth/Device.hpp>
#include <Bluetooth/Error.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Audio/AudioCommon.hpp>
#include <audio/BluetoothAudioDevice.hpp>
M module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp => module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp +3 -3
@@ 3,7 3,7 @@
#include "GAP.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-bluetooth/BluetoothMessage.hpp>
#include <service-bluetooth/messages/ResponseVisibleDevices.hpp>
#include <service-bluetooth/messages/Unpair.hpp>
@@ 156,8 156,8 @@ namespace bluetooth
LOG_INFO(", rssi %d dBm", static_cast<int8_t>(gap_event_inquiry_result_get_rssi(packet)));
}
if (gap_event_inquiry_result_get_name_available(packet) != 0u) {
- auto name = gap_event_inquiry_result_get_name(packet);
- device.name = std::string{reinterpret_cast<const char *>(name)};
+ auto name = gap_event_inquiry_result_get_name(packet);
+ device.name = std::string{reinterpret_cast<const char *>(name)};
device.state = REMOTE_NAME_FETCHED;
}
else {
M module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp => module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp +2 -2
@@ 226,7 226,7 @@ namespace bluetooth
break;
case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED:
LOG_DEBUG("Service level connection released.\n");
- aclHandle = HCI_CON_HANDLE_INVALID;
+ aclHandle = HCI_CON_HANDLE_INVALID;
isConnected = false;
sendAudioEvent(audio::EventType::BlutoothHFPDeviceState, audio::Event::DeviceState::Disconnected);
@@ 258,7 258,7 @@ namespace bluetooth
// todo stop ringtone stream here
break;
case HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER:
- hfp_ag_outgoing_call_accepted();
+ hfp_ag_outgoing_call_accepted();
break;
case HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG:
M module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp => module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp +2 -2
@@ 191,7 191,7 @@ namespace bluetooth
LOG_DEBUG("Audio connection establishment failed with status %u\n",
hsp_subevent_audio_connection_complete_get_status(event));
sendAudioEvent(audio::EventType::BlutoothHSPDeviceState, audio::Event::DeviceState::Disconnected);
- isConnected = false;
+ isConnected = false;
callAnswered = false;
}
else {
@@ 203,7 203,7 @@ namespace bluetooth
break;
case HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE:
LOG_DEBUG("Audio connection released.\n\n");
- scoHandle = HCI_CON_HANDLE_INVALID;
+ scoHandle = HCI_CON_HANDLE_INVALID;
callAnswered = false;
break;
case HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED:
M module-bsp/CMakeLists.txt => module-bsp/CMakeLists.txt +3 -6
@@ 23,12 23,6 @@ target_sources(
drivers/pwm/DriverPWM.cpp
drivers/semc/DriverSEMC.cpp
drivers/usdhc/DriverUSDHC.cpp
-
- PUBLIC
- hal/temperature_source/TemperatureSource.hpp
- hal/battery_charger/AbstractBatteryCharger.hpp
- hal/key_input/AbstractKeyInput.hpp
- hal/key_input/KeyEventDefinitions.hpp
)
add_board_subdirectory(board)
@@ 69,8 63,11 @@ target_include_directories(${PROJECT_NAME}
>
)
+add_subdirectory(hal)
+
target_link_libraries(${PROJECT_NAME}
PUBLIC
+ hal
eventstore
module-os
service-bluetooth
M module-bsp/board/linux/audio/LinuxCellularAudio.cpp => module-bsp/board/linux/audio/LinuxCellularAudio.cpp +1 -1
@@ 5,7 5,7 @@
#include "linux_audiocodec.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp
{
M module-bsp/board/linux/audio/linux_audiocodec.cpp => module-bsp/board/linux/audio/linux_audiocodec.cpp +1 -1
@@ 3,7 3,7 @@
#include "linux_audiocodec.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp
{
M module-bsp/board/linux/bell_temp_sensor/bell_temp_sensor.cpp => module-bsp/board/linux/bell_temp_sensor/bell_temp_sensor.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "bsp/bell_temp_sensor/bell_temp_sensor.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp::bell_temp_sensor
{
M module-bsp/board/linux/bluetooth/Bluetooth.cpp => module-bsp/board/linux/bluetooth/Bluetooth.cpp +1 -1
@@ 3,7 3,7 @@
#include "bsp/bluetooth/Bluetooth.hpp"
#include "BluetoothWorker.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
/// stubs
M module-bsp/board/linux/cellular/linux_cellular.cpp => module-bsp/board/linux/cellular/linux_cellular.cpp +1 -1
@@ 7,7 7,7 @@
#include <iostream>
#include <algorithm>
-#include <log.hpp>
+#include <log/log.hpp>
#include "mutex.hpp"
#include <EventStore.hpp>
#include <errno.h>
M module-bsp/board/linux/hal/key_input/KeyInput.hpp => module-bsp/board/linux/hal/key_input/KeyInput.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-bsp/hal/key_input/AbstractKeyInput.hpp>
+#include <hal/key_input/AbstractKeyInput.hpp>
namespace hal::key_input
{
M module-bsp/board/linux/hal/temperature_source/TemperatureSource.cpp => module-bsp/board/linux/hal/temperature_source/TemperatureSource.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <module-bsp/hal/temperature_source/TemperatureSource.hpp>
+#include <hal/temperature_source/TemperatureSource.hpp>
#include <hal/GenericFactory.hpp>
namespace hal::temperature
M module-bsp/board/linux/vibrator/vibrator.cpp => module-bsp/board/linux/vibrator/vibrator.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "bsp/vibrator/vibrator.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp
{
M module-bsp/board/linux/watchdog/software_watchdog.cpp => module-bsp/board/linux/watchdog/software_watchdog.cpp +1 -1
@@ 5,7 5,7 @@
#include <module-os/RTOSWrapper/include/critical.hpp>
#include <module-os/RTOSWrapper/include/ticks.hpp>
#include <Service/Common.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <cstdlib>
namespace bsp::watchdog
M module-bsp/board/rt1051/bellpx/bsp/bell_temp_sensor/bell_temp_sensor.cpp => module-bsp/board/rt1051/bellpx/bsp/bell_temp_sensor/bell_temp_sensor.cpp +1 -1
@@ 8,7 8,7 @@
#include "drivers/gpio/DriverGPIO.hpp"
#include "fsl_common.h"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp::bell_temp_sensor
{
M module-bsp/board/rt1051/bellpx/bsp/switches/switches.cpp => module-bsp/board/rt1051/bellpx/bsp/switches/switches.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <module-utils/Utils.hpp> // for byte conversion functions. it is included first because of magic enum define
+#include <Utils.hpp> // for byte conversion functions. it is included first because of magic enum define
#include <FreeRTOS.h>
#include <mutex.hpp>
M module-bsp/board/rt1051/bellpx/clock_config.cpp => module-bsp/board/rt1051/bellpx/clock_config.cpp +1 -1
@@ 54,7 54,7 @@
#include "fsl_iomuxc.h"
#include "fsl_dcdc.h"
#include "fsl_gpc.h"
-#include <log.hpp>
+#include <log/log.hpp>
/*******************************************************************************
* Definitions
M module-bsp/board/rt1051/bellpx/hal/key_input/KeyInput.hpp => module-bsp/board/rt1051/bellpx/hal/key_input/KeyInput.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-bsp/hal/key_input/AbstractKeyInput.hpp>
+#include <hal/key_input/AbstractKeyInput.hpp>
namespace hal::key_input
{
M module-bsp/board/rt1051/bellpx/hal/temperature_source/TemperatureSource.cpp => module-bsp/board/rt1051/bellpx/hal/temperature_source/TemperatureSource.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <module-bsp/hal/temperature_source/TemperatureSource.hpp>
+#include <hal/temperature_source/TemperatureSource.hpp>
#include <hal/GenericFactory.hpp>
#include "bsp/bell_temp_sensor/bell_temp_sensor.hpp"
M module-bsp/board/rt1051/bellpx/irq_gpio.cpp => module-bsp/board/rt1051/bellpx/irq_gpio.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "board/irq_gpio.hpp"
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include "board.h"
#include "FreeRTOS.h"
M module-bsp/board/rt1051/bluetooth/BlueKitchen.cpp => module-bsp/board/rt1051/bluetooth/BlueKitchen.cpp +1 -1
@@ 3,7 3,7 @@
#include "bsp/bluetooth/Bluetooth.hpp"
#include "BluetoothWorker.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "FreeRTOS.h"
#include "fsl_lpuart.h"
#include "board.h"
M module-bsp/board/rt1051/bluetooth/BluetoothCommon.cpp => module-bsp/board/rt1051/bluetooth/BluetoothCommon.cpp +1 -1
@@ 3,7 3,7 @@
#include "BluetoothWorker.hpp"
#include "bsp/bluetooth/Bluetooth.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "FreeRTOS.h"
#include "board.h"
#include "fsl_lpuart_edma.h"
M module-bsp/board/rt1051/bluetooth/Bluetopia.cpp => module-bsp/board/rt1051/bluetooth/Bluetopia.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "bluetooth/Bluetooth.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "fsl_lpuart.h"
#include "board.h"
M module-bsp/board/rt1051/bsp/audio/CodecMAX98090.cpp => module-bsp/board/rt1051/bsp/audio/CodecMAX98090.cpp +1 -1
@@ 5,7 5,7 @@
#include "max98090_regs.hpp"
#include "board/BoardDefinitions.hpp"
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <map>
M module-bsp/board/rt1051/bsp/eeprom/eeprom.cpp => module-bsp/board/rt1051/bsp/eeprom/eeprom.cpp +1 -1
@@ 7,7 7,7 @@
#include "drivers/i2c/DriverI2C.hpp"
#include "fsl_common.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include "task.h"
M module-bsp/board/rt1051/bsp/light_sensor/light_sensor.cpp => module-bsp/board/rt1051/bsp/light_sensor/light_sensor.cpp +1 -1
@@ 8,7 8,7 @@
#include "drivers/gpio/DriverGPIO.hpp"
#include "fsl_common.h"
-#include <log.hpp>
+#include <log/log.hpp>
namespace bsp::light_sensor
{
M module-bsp/board/rt1051/bsp/lpm/CpuFreqLPM.cpp => module-bsp/board/rt1051/bsp/lpm/CpuFreqLPM.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "CpuFreqLPM.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "fsl_dcdc.h"
namespace bsp
M module-bsp/board/rt1051/bsp/lpm/RT1051LPM.cpp => module-bsp/board/rt1051/bsp/lpm/RT1051LPM.cpp +1 -1
@@ 5,7 5,7 @@
#include "board.h"
#include "reboot_codes.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "board/BoardDefinitions.hpp"
#include "bsp/watchdog/watchdog.hpp"
#include <board/clock_config.h>
M module-bsp/board/rt1051/bsp/magnetometer/magnetometer.cpp => module-bsp/board/rt1051/bsp/magnetometer/magnetometer.cpp +1 -1
@@ 3,7 3,7 @@
#include "bsp/magnetometer/magnetometer.hpp"
-#include <module-utils/Utils.hpp> // for byte conversion functions. it is included first because of magic enum define
+#include <Utils.hpp> // for byte conversion functions. it is included first because of magic enum define
#include "ALS31300.hpp"
#include "board/BoardDefinitions.hpp"
M module-bsp/board/rt1051/common/chip.cpp => module-bsp/board/rt1051/common/chip.cpp +1 -1
@@ 3,7 3,7 @@
#include "chip.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <map>
#include <string>
M module-bsp/board/rt1051/common/startup_mimxrt1052.cpp => module-bsp/board/rt1051/common/startup_mimxrt1052.cpp +1 -1
@@ 453,7 453,7 @@ extern "C"
#include "MIMXRT1051.h"
#include "macros.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include <cinttypes>
#include <cstdlib>
#include <cstdint>
M module-bsp/board/rt1051/drivers/RT1051DriverDMA.cpp => module-bsp/board/rt1051/drivers/RT1051DriverDMA.cpp +1 -1
@@ 3,7 3,7 @@
#include "RT1051DriverDMA.hpp"
#include <algorithm>
-#include <log.hpp>
+#include <log/log.hpp>
namespace drivers
{
M module-bsp/board/rt1051/drivers/RT1051DriverGPIO.cpp => module-bsp/board/rt1051/drivers/RT1051DriverGPIO.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "RT1051DriverGPIO.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace drivers
{
M module-bsp/board/rt1051/drivers/RT1051DriverI2C.cpp => module-bsp/board/rt1051/drivers/RT1051DriverI2C.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "RT1051DriverI2C.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "../board.h"
namespace drivers
M module-bsp/board/rt1051/drivers/RT1051DriverPLL.cpp => module-bsp/board/rt1051/drivers/RT1051DriverPLL.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "RT1051DriverPLL.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "board/clock_config.h"
namespace drivers
M module-bsp/board/rt1051/drivers/RT1051DriverPWM.cpp => module-bsp/board/rt1051/drivers/RT1051DriverPWM.cpp +1 -1
@@ 3,7 3,7 @@
#include "RT1051DriverPWM.hpp"
#include "RT1051DriverPWMhelper.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "../board.h"
#include <algorithm>
M module-bsp/board/rt1051/puretx/clock_config.cpp => module-bsp/board/rt1051/puretx/clock_config.cpp +1 -1
@@ 54,7 54,7 @@
#include "fsl_iomuxc.h"
#include "fsl_dcdc.h"
#include "fsl_gpc.h"
-#include <log.hpp>
+#include <log/log.hpp>
/*******************************************************************************
* Definitions
M module-bsp/board/rt1051/puretx/hal/key_input/KeyInput.hpp => module-bsp/board/rt1051/puretx/hal/key_input/KeyInput.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-bsp/hal/key_input/AbstractKeyInput.hpp>
+#include <hal/key_input/AbstractKeyInput.hpp>
namespace hal::key_input
{
M module-bsp/bsp/cellular/CellularResult.hpp => module-bsp/bsp/cellular/CellularResult.hpp +2 -2
@@ 1,7 1,7 @@
#pragma once
#include <memory>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <utility>
namespace bsp::cellular
@@ 50,7 50,7 @@ namespace bsp::cellular
[[nodiscard]] auto serialize() const -> std::unique_ptr<uint8_t[]>
{
- auto serialized = std::make_unique< uint8_t[]>(data.size() + sizeof(resultCode));
+ auto serialized = std::make_unique<uint8_t[]>(data.size() + sizeof(resultCode));
serialized.get()[0] = static_cast<unsigned char>(resultCode);
if (data.size() > 0) {
M module-bsp/bsp/usb/usb.hpp => module-bsp/bsp/usb/usb.hpp +3 -2
@@ 12,7 12,7 @@ extern "C"
#include <errno.h>
#include <iostream>
-#include <log.hpp>
+#include <log/log.hpp>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ 29,7 29,8 @@ namespace bsp
Configured
};
- struct usbInitParams {
+ struct usbInitParams
+ {
xQueueHandle queueHandle;
xQueueHandle irqQueueHandle;
const char *serialNumber;
A module-bsp/hal/CMakeLists.txt => module-bsp/hal/CMakeLists.txt +17 -0
@@ 0,0 1,17 @@
+add_library(hal INTERFACE)
+
+target_include_directories(hal
+ INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+)
+
+target_sources(hal
+ INTERFACE
+ include/hal/temperature_source/TemperatureSource.hpp
+ include/hal/GenericFactory.hpp
+ include/hal/battery_charger/AbstractBatteryCharger.hpp
+ include/hal/cellular/SIM.hpp
+ include/hal/key_input/RawKey.hpp
+ include/hal/key_input/KeyEventDefinitions.hpp
+ include/hal/key_input/AbstractKeyInput.hpp
+)
R module-bsp/hal/GenericFactory.hpp => module-bsp/hal/include/hal/GenericFactory.hpp +0 -0
R module-bsp/hal/battery_charger/AbstractBatteryCharger.hpp => module-bsp/hal/include/hal/battery_charger/AbstractBatteryCharger.hpp +0 -0
A module-bsp/hal/include/hal/cellular/SIM.hpp => module-bsp/hal/include/hal/cellular/SIM.hpp +14 -0
@@ 0,0 1,14 @@
+// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+namespace hal::cellular
+{
+ enum class SimSlot
+ {
+ SIM1 = 0,
+ SIM2 = 1
+ };
+
+} // namespace hal::cellular
R module-bsp/hal/key_input/AbstractKeyInput.hpp => module-bsp/hal/include/hal/key_input/AbstractKeyInput.hpp +0 -0
R module-bsp/hal/key_input/KeyEventDefinitions.hpp => module-bsp/hal/include/hal/key_input/KeyEventDefinitions.hpp +0 -0
R module-utils/common_data/RawKey.hpp => module-bsp/hal/include/hal/key_input/RawKey.hpp +4 -4
@@ 29,9 29,9 @@ struct RawKey
/// set all values to zero, set new keyCode and state
void reset(bsp::KeyCodes keyCode = bsp::KeyCodes::Undefined, State state = State::Undefined)
{
- this->keyCode = keyCode;
- this->state = state;
- timePress = 0;
- timeRelease = 0;
+ this->keyCode = keyCode;
+ this->state = state;
+ timePress = 0;
+ timeRelease = 0;
}
};
R module-bsp/hal/temperature_source/TemperatureSource.hpp => module-bsp/hal/include/hal/temperature_source/TemperatureSource.hpp +0 -0
M module-cellular/at/Urc.hpp => module-cellular/at/Urc.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include "UrcHandler.hpp"
namespace at::urc
M module-cellular/at/cmd/src/CFUN.cpp => module-cellular/at/cmd/src/CFUN.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
#include <type_traits>
M module-cellular/at/cmd/src/CPBR.cpp => module-cellular/at/cmd/src/CPBR.cpp +1 -1
@@ 3,7 3,7 @@
#include <at/cmd/CPBR.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
M module-cellular/at/cmd/src/CPBS.cpp => module-cellular/at/cmd/src/CPBS.cpp +1 -1
@@ 3,7 3,7 @@
#include <at/cmd/CPBS.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
M module-cellular/at/cmd/src/CSCA.cpp => module-cellular/at/cmd/src/CSCA.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
#include <type_traits>
M module-cellular/at/cmd/src/QECCNUM.cpp => module-cellular/at/cmd/src/QECCNUM.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
#include <type_traits>
M module-cellular/at/cmd/src/QNWINFO.cpp => module-cellular/at/cmd/src/QNWINFO.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <at/cmd/QNWINFO.hpp>
#include <Utils.hpp>
M module-cellular/at/cmd/src/QSIMSTAT.cpp => module-cellular/at/cmd/src/QSIMSTAT.cpp +1 -1
@@ 3,7 3,7 @@
#include <at/cmd/QSIMSTAT.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
M module-cellular/at/response.hpp => module-cellular/at/response.hpp +1 -1
@@ 4,7 4,7 @@
#pragma once
#include "Result.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <map>
#include <memory>
#include <string>
M module-cellular/at/src/UrcPoweredDown.cpp => module-cellular/at/src/UrcPoweredDown.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <UrcPoweredDown.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
using namespace at::urc;
M module-cellular/at/src/UrcResponse.cpp => module-cellular/at/src/UrcResponse.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <UrcResponse.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
using namespace at::urc;
M module-cellular/modem/ATCommon.cpp => module-cellular/modem/ATCommon.cpp +1 -1
@@ 5,7 5,7 @@
#include <at/Cmd.hpp>
#include "time/ScopedTime.hpp"
#include <functional>
-#include <log.hpp>
+#include <log/log.hpp>
#include <string>
#include <Utils.hpp>
#include "ATStream.hpp"
M module-cellular/modem/mux/CellularMuxFrame.h => module-cellular/modem/mux/CellularMuxFrame.h +1 -1
@@ 7,7 7,7 @@
#include <inttypes.h>
#include <vector>
#include <iostream>
-#include <log.hpp>
+#include <log/log.hpp>
#define TS0710_FLAG 0xF9
#define TS0710_FRAME_HDR_LEN 6 // without extended address byte
M module-cellular/modem/mux/DLCChannel.cpp => module-cellular/modem/mux/DLCChannel.cpp +1 -1
@@ 6,7 6,7 @@
#include "CellularMuxData.h"
#include "CellularMuxFrame.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include <ticks.hpp>
#include <Utils.hpp>
#include <magic_enum.hpp>
M module-db/CMakeLists.txt => module-db/CMakeLists.txt +1 -0
@@ 171,6 171,7 @@ target_link_libraries(${PROJECT_NAME}
application-calendar
Microsoft.GSL::GSL
rrule
+ board
)
# Host target configuration(mainly used for unit testing)
M module-db/Database/Database.cpp => module-db/Database/Database.cpp +1 -1
@@ 4,7 4,7 @@
#include "Database.hpp"
#include "DatabaseInitializer.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <purefs/filesystem_paths.hpp>
#include <gsl/util>
M module-db/Database/DatabaseInitializer.cpp => module-db/Database/DatabaseInitializer.cpp +1 -1
@@ 9,7 9,7 @@
#include <set>
#include <string>
#include <sstream>
-#include <log.hpp>
+#include <log/log.hpp>
DatabaseInitializer::DatabaseInitializer(Database *db) : db(db)
{}
M module-db/Database/Field.cpp => module-db/Database/Field.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "Field.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <functional>
const char *Field::getCString() const
M module-db/Interface/CalllogRecord.cpp => module-db/Interface/CalllogRecord.cpp +1 -1
@@ 4,7 4,7 @@
#include "CalllogRecord.hpp"
#include <ContactRecord.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Tables/CalllogTable.hpp>
#include <PhoneNumber.hpp>
#include <Utils.hpp>
M module-db/Interface/NotificationsRecord.cpp => module-db/Interface/NotificationsRecord.cpp +1 -1
@@ 9,7 9,7 @@
#include "module-db/queries/notifications/QueryNotificationsGetAll.hpp"
#include "Databases/NotificationsDB.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <Utils.hpp>
#include <cassert>
M module-db/Interface/Record.cpp => module-db/Interface/Record.cpp +1 -1
@@ 3,7 3,7 @@
#include "Record.hpp"
#include <Common/Query.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace db
{
M module-db/Interface/SMSRecord.cpp => module-db/Interface/SMSRecord.cpp +4 -4
@@ 19,7 19,7 @@
#include "queries/messages/sms/QuerySMSGetLastByThreadID.hpp"
#include <queries/messages/sms/QuerySMSGetForList.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <PhoneNumber.hpp>
#include <optional>
@@ 205,8 205,8 @@ void SMSRecordInterface::UpdateThreadSummary(ThreadRecord &threadToUpdate, const
{
threadToUpdate.snippet = rec.body.substr(
0, std::min<size_t>({snippetLength, rec.body.length(), rec.body.find("\n"), rec.body.find("\r")}));
- threadToUpdate.date = rec.date;
- threadToUpdate.type = rec.type;
+ threadToUpdate.date = rec.date;
+ threadToUpdate.type = rec.type;
}
bool SMSRecordInterface::RemoveByID(uint32_t id)
@@ 464,7 464,7 @@ std::unique_ptr<db::QueryResult> SMSRecordInterface::updateQuery(const std::shar
auto SMSRecordInterface::getQueryRecords(const std::shared_ptr<db::Query> &query) -> std::vector<SMSRecord>
{
const auto localQuery = static_cast<const db::query::SMSGet *>(query.get());
- auto smsVector = smsDB->sms.getLimitOffset(localQuery->getOffset(), localQuery->getLimit());
+ auto smsVector = smsDB->sms.getLimitOffset(localQuery->getOffset(), localQuery->getLimit());
return std::vector<SMSRecord>(smsVector.begin(), smsVector.end());
}
M module-db/Interface/SMSTemplateRecord.cpp => module-db/Interface/SMSTemplateRecord.cpp +1 -1
@@ 10,7 10,7 @@
#include "queries/messages/templates/QuerySMSTemplateUpdate.hpp"
#include <queries/messages/templates/QuerySMSTemplateGetForList.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <cassert>
M module-db/Interface/ThreadRecord.cpp => module-db/Interface/ThreadRecord.cpp +3 -3
@@ 15,7 15,7 @@
#include <queries/messages/threads/QueryThreadsGetCount.hpp>
#include <cassert>
-#include <log.hpp>
+#include <log/log.hpp>
ThreadRecordInterface::ThreadRecordInterface(SmsDB *smsDb, ContactsDB *contactsDb)
: smsDB(smsDb), contactsDB(contactsDb)
@@ 241,7 241,7 @@ std::unique_ptr<db::QueryResult> ThreadRecordInterface::markAsReadQuery(const st
std::vector<ThreadRecord> ThreadRecordInterface::getThreads(const std::shared_ptr<db::Query> &query)
{
const auto localQuery = static_cast<const db::query::ThreadsGet *>(query.get());
- auto dbResult = smsDB->threads.getLimitOffset(localQuery->offset, localQuery->limit);
+ auto dbResult = smsDB->threads.getLimitOffset(localQuery->offset, localQuery->limit);
return std::vector<ThreadRecord>(dbResult.begin(), dbResult.end());
}
@@ 289,7 289,7 @@ std::unique_ptr<db::QueryResult> ThreadRecordInterface::threadGetByIDQuery(const
const auto ret = GetByID(localQuery->id);
auto response = std::make_unique<db::query::ThreadGetByIDResult>(ret.isValid() ? std::optional<ThreadRecord>{ret}
- : std::nullopt);
+ : std::nullopt);
response->setRequestQuery(query);
return response;
}
M module-db/Tables/CalllogTable.cpp => module-db/Tables/CalllogTable.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "CalllogTable.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <Utils.hpp>
CalllogTable::CalllogTable(Database *db) : Table(db)
M module-db/Tables/ContactsTable.cpp => module-db/Tables/ContactsTable.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "ContactsTable.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <Utils.hpp>
namespace ColumnName
M module-db/Tables/NotesTable.cpp => module-db/Tables/NotesTable.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "NotesTable.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <string>
NotesTable::NotesTable(Database *db) : Table(db)
M module-db/Tables/NotificationsTable.cpp => module-db/Tables/NotificationsTable.cpp +1 -1
@@ 4,7 4,7 @@
#include "NotificationsTable.hpp"
#include "Database/Database.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <Utils.hpp>
#include <cassert>
M module-db/Tables/Record.hpp => module-db/Tables/Record.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <log.hpp>
+#include <log/log.hpp>
#include <cstdint>
constexpr uint32_t DB_ID_NONE = 0;
M module-db/Tables/SMSTable.cpp => module-db/Tables/SMSTable.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "SMSTable.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
SMSTable::SMSTable(Database *db) : Table(db)
{}
M module-db/Tables/SMSTemplateTable.cpp => module-db/Tables/SMSTemplateTable.cpp +1 -1
@@ 4,7 4,7 @@
#include "SMSTemplateTable.hpp"
#include <Utils.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <cassert>
M module-db/Tables/ThreadsTable.cpp => module-db/Tables/ThreadsTable.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "ThreadsTable.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
ThreadsTable::ThreadsTable(Database *db) : Table(db)
{}
M module-db/tests/DbInitializer.cpp => module-db/tests/DbInitializer.cpp +1 -1
@@ 8,7 8,7 @@
#include <memory>
#include <set>
#include <string>
-#include <log.hpp>
+#include <log/log.hpp>
DatabaseInitializer::DatabaseInitializer(Database *db) : db(db)
{}
M module-gui/CMakeLists.txt => module-gui/CMakeLists.txt +7 -4
@@ 14,17 14,20 @@ include_directories( ../module-utils )
target_link_libraries(${PROJECT_NAME}
PUBLIC
- ${TARGET_LIBRARIES}
+ ${TARGET_LIBRARIES}
+ module-bsp
eventstore
- math
- module-utils
+ utils-math
+ module-utils
+ sys-timers
+ sys-watchdog
utf8
PRIVATE
i18n
json::json
Microsoft.GSL::GSL
pugixml::pugixml
- time
+ utils-time
)
# Board specific compilation definitions,options,include directories and features
M module-gui/gui/core/DrawCommand.cpp => module-gui/gui/core/DrawCommand.cpp +1 -1
@@ 18,7 18,7 @@
#include "FontManager.hpp"
#include "RawFont.hpp"
// utils
-#include <log.hpp>
+#include <log/log.hpp>
// module-utils
#include <cmath>
#include <cassert>
M module-gui/gui/core/Font.cpp => module-gui/gui/core/Font.cpp +1 -1
@@ 4,7 4,7 @@
#include "Font.hpp"
#include "FontManager.hpp" // for FontManager
#include "RawFont.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <algorithm>
#include <sstream>
M module-gui/gui/core/FontManager.cpp => module-gui/gui/core/FontManager.cpp +1 -1
@@ 5,7 5,7 @@
#include "Common.hpp" // for Status, Status::GUI_SUCCESS
#include "FontInfo.hpp" // for FontInfo
#include "RawFont.hpp" // for RawFont
-#include <log.hpp> // for LOG_ERROR, LOG_INFO, LOG_WARN
+#include <log/log.hpp> // for LOG_ERROR, LOG_INFO, LOG_WARN
#include <Utils.hpp>
#include <filesystem>
#include <cstdio>
M module-gui/gui/core/ImageManager.cpp => module-gui/gui/core/ImageManager.cpp +3 -3
@@ 7,7 7,7 @@
#include "PixMap.hpp"
#include "DrawCommand.hpp"
#include "Renderer.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <set>
#include <string>
#include <filesystem>
@@ 28,8 28,8 @@ namespace gui
void ImageManager::loadImageMaps(std::string baseDirectory)
{
- mapFolder = baseDirectory + "/images";
- auto [pixMapFiles, vecMapFiles] = getImageMapList(".mpi", ".vpi");
+ mapFolder = baseDirectory + "/images";
+ auto [pixMapFiles, vecMapFiles] = getImageMapList(".mpi", ".vpi");
for (std::string mapName : pixMapFiles) {
loadPixMap(mapName);
M module-gui/gui/core/RawFont.cpp => module-gui/gui/core/RawFont.cpp +1 -1
@@ 8,7 8,7 @@
#include "FontKerning.hpp" // for FontKerning
#include "Renderer.hpp" // for Renderer
#include "TextConstants.hpp" // for newline
-#include <log.hpp> // for LOG_ERROR
+#include <log/log.hpp> // for LOG_ERROR
#include "utf8/UTF8.hpp" // for UTF8
#include <cstring> // for memcpy
#include <utility> // for pair
M module-gui/gui/input/InputEvent.hpp => module-gui/gui/input/InputEvent.hpp +2 -1
@@ 3,10 3,11 @@
#pragma once
+#include <hal/key_input/RawKey.hpp>
+
#include <sstream>
#include <cstdint>
#include <type_traits>
-#include "common_data/RawKey.hpp"
namespace gui
{
M module-gui/gui/input/Profile.cpp => module-gui/gui/input/Profile.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "utf8/UTF8.hpp"
#include "Profile.hpp"
#include <Utils.hpp>
M module-gui/gui/input/Translator.cpp => module-gui/gui/input/Translator.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "Translator.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <algorithm>
#include <filesystem>
#include "i18n/i18n.hpp"
M module-gui/gui/input/Translator.hpp => module-gui/gui/input/Translator.hpp +1 -1
@@ 5,7 5,7 @@
#include "InputEvent.hpp"
#include "Profile.hpp"
-#include <common_data/RawKey.hpp>
+#include <hal/key_input/RawKey.hpp>
#include <cstdint>
#include <map>
#include <memory>
M module-gui/gui/widgets/Arc.cpp => module-gui/gui/widgets/Arc.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "Arc.hpp"
#include "DrawCommand.hpp"
M module-gui/gui/widgets/BottomBar.cpp => module-gui/gui/widgets/BottomBar.cpp +1 -1
@@ 12,7 12,7 @@
#include "Margins.hpp"
#include "utf8/UTF8.hpp"
#include <Style.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-gui/gui/widgets/BoxLayout.cpp => module-gui/gui/widgets/BoxLayout.cpp +1 -1
@@ 5,7 5,7 @@
#include "BoxLayoutSizeStore.hpp"
#include <InputEvent.hpp>
#include <Label.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include "assert.h"
namespace gui
M module-gui/gui/widgets/BoxLayout.hpp => module-gui/gui/widgets/BoxLayout.hpp +5 -5
@@ 9,7 9,7 @@
#include "Rect.hpp"
#include <Alignment.hpp>
#include "LayoutSizeStore.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
@@ 60,7 60,7 @@ namespace gui
};
template <Axis axis> void resizeItems();
- template <Axis axis>[[nodiscard]] Position getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el);
+ template <Axis axis> [[nodiscard]] Position getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el);
std::list<Item *> outOfDrawAreaItems;
void addToOutOfDrawAreaList(Item *item);
@@ 68,16 68,16 @@ namespace gui
virtual void resizeItems();
bool reverseOrder = false;
- template <Axis axis>[[nodiscard]] Length calculateElemResize(Item *el, Length &toSplit);
+ template <Axis axis> [[nodiscard]] Length calculateElemResize(Item *el, Length &toSplit);
template <Axis axis>
[[nodiscard]] Length calculateElemAxisSize(Item *el, Length calculatedResize, Length &toSplit);
- template <Axis axis>[[nodiscard]] Length calculateElemOrtAxisSize(Item *el);
+ template <Axis axis> [[nodiscard]] Length calculateElemOrtAxisSize(Item *el);
template <Axis axis>
[[nodiscard]] Position calculateElemAxisPosition(Item *el,
Length axisItemSize,
Position &startingPosition,
Position &leftPosition);
- template <Axis axis>[[nodiscard]] Position calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize);
+ template <Axis axis> [[nodiscard]] Position calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize);
Item *getLastVisibleElement();
M module-gui/gui/widgets/Circle.cpp => module-gui/gui/widgets/Circle.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "Circle.hpp"
#include "DrawCommand.hpp"
M module-gui/gui/widgets/GridLayout.cpp => module-gui/gui/widgets/GridLayout.cpp +1 -1
@@ 4,7 4,7 @@
#include "GridLayout.hpp"
#include "InputEvent.hpp"
#include "Style.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
using namespace gui;
M module-gui/gui/widgets/Image.cpp => module-gui/gui/widgets/Image.cpp +1 -1
@@ 7,7 7,7 @@
#include "ImageManager.hpp"
#include <utf8/UTF8.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-gui/gui/widgets/InputMode.cpp => module-gui/gui/widgets/InputMode.cpp +1 -1
@@ 4,7 4,7 @@
#include <InputMode.hpp>
#include <i18n/i18n.hpp>
#include <map>
-#include <log.hpp>
+#include <log/log.hpp>
/// input mode strings - as these are stored in json (in files...)
const std::map<InputMode::Mode, std::string> input_mode = {
M module-gui/gui/widgets/Label.cpp => module-gui/gui/widgets/Label.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "utf8/UTF8.hpp"
#include "../core/DrawCommand.hpp"
M module-gui/gui/widgets/ListItem.cpp => module-gui/gui/widgets/ListItem.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "ListItem.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <Style.hpp>
namespace gui
M module-gui/gui/widgets/ListView.cpp => module-gui/gui/widgets/ListView.cpp +1 -1
@@ 4,7 4,7 @@
#include "ListView.hpp"
#include "InputEvent.hpp"
#include "cassert"
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-gui/gui/widgets/ListViewEngine.cpp => module-gui/gui/widgets/ListViewEngine.cpp +2 -2
@@ 4,7 4,7 @@
#include "ListViewEngine.hpp"
#include <cassert>
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
@@ 436,7 436,7 @@ namespace gui
unsigned int diff = currentPageSize < body->getVisibleChildrenCount()
? 0
: currentPageSize - body->getVisibleChildrenCount();
- currentPageSize = body->getVisibleChildrenCount();
+ currentPageSize = body->getVisibleChildrenCount();
if (direction == listview::Direction::Top) {
startIndex += diff;
M module-gui/gui/widgets/ProgressBar.cpp => module-gui/gui/widgets/ProgressBar.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <Math.hpp>
#include "DrawCommand.hpp"
M module-gui/gui/widgets/Rect.cpp => module-gui/gui/widgets/Rect.cpp +1 -1
@@ 13,7 13,7 @@
#include "Rect.hpp"
#include "Style.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-gui/gui/widgets/RichTextParser.cpp => module-gui/gui/widgets/RichTextParser.cpp +2 -2
@@ 9,11 9,11 @@
#include <sstream>
#include <string>
#include <map>
-#include <log.hpp>
+#include <log/log.hpp>
#include "TextFormat.hpp"
#include <pugixml.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <utility>
#ifdef DEBUG_RTP
M module-gui/gui/widgets/Text.cpp => module-gui/gui/widgets/Text.cpp +1 -1
@@ 15,7 15,7 @@
#include "TextDocument.hpp"
#include "TextLine.hpp"
#include "TextParse.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "utf8/UTF8.hpp"
#include <Style.hpp>
#include <cassert>
M module-gui/gui/widgets/TextBlock.cpp => module-gui/gui/widgets/TextBlock.cpp +1 -1
@@ 3,7 3,7 @@
#include "TextBlock.hpp"
#include "TextConstants.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <cassert>
#include <TextFormat.hpp>
#include <RawFont.hpp>
M module-gui/gui/widgets/TextBlockCursor.cpp => module-gui/gui/widgets/TextBlockCursor.cpp +1 -1
@@ 5,7 5,7 @@
#include "TextBlock.hpp"
#include "TextDocument.hpp"
#include "TextParse.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <cassert>
static const int last_char_inclusive = 0; // if then -1 / else 0
M module-gui/gui/widgets/TextCursor.cpp => module-gui/gui/widgets/TextCursor.cpp +1 -1
@@ 6,7 6,7 @@
#include "Text.hpp"
#include "TextBlockCursor.hpp"
#include "TextDocument.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include "TextLine.hpp"
#include <cassert>
#include <RawFont.hpp>
M module-gui/gui/widgets/TextLineCursor.cpp => module-gui/gui/widgets/TextLineCursor.cpp +1 -1
@@ 3,7 3,7 @@
#include "TextLineCursor.hpp"
#include "Text.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#define debug_text_cursor(...)
// #define debug_text_cursor(...) LOG_DEBUG(__VA_ARGS__)
M module-gui/gui/widgets/status-bar/PhoneMode.cpp => module-gui/gui/widgets/status-bar/PhoneMode.cpp +1 -1
@@ 3,7 3,7 @@
#include "PhoneMode.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <i18n/i18n.hpp>
#include "Item.hpp"
M module-gui/gui/widgets/status-bar/StatusBarWidgetBase.hpp => module-gui/gui/widgets/status-bar/StatusBarWidgetBase.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui::status_bar
{
M module-gui/test/mock/TestListViewProvider.cpp => module-gui/test/mock/TestListViewProvider.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "TestListViewProvider.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace gui
{
M module-gui/test/test-catch/test-context.cpp => module-gui/test/test-catch/test-context.cpp +1 -1
@@ 6,7 6,7 @@
#include <catch2/catch.hpp>
#include <module-gui/gui/core/Context.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
TEST_CASE("test context size and position")
{
M module-gui/test/test-catch/test-gui.cpp => module-gui/test/test-catch/test-gui.cpp +1 -1
@@ 17,7 17,7 @@
#include <fcntl.h>
#include <catch2/catch.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <utf8/UTF8.hpp>
#include <module-gui/gui/core/ImageManager.hpp>
M module-gui/test/test-google/CMakeLists.txt => module-gui/test/test-google/CMakeLists.txt +2 -0
@@ 12,5 12,7 @@ add_gtest_executable(
LIBS
module-utils
module-gui
+ sys-service
+ sys-timers
USE_FS
)
M module-gui/test/test-google/test-gui-boxlayout.cpp => module-gui/test/test-google/test-gui-boxlayout.cpp +1 -1
@@ 5,7 5,7 @@
#include "TestBoxLayout.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <module-gui/test/mock/TestListViewProvider.hpp>
#include <gui/input/InputEvent.hpp>
M module-gui/test/test-google/test-gui-gridlayout.cpp => module-gui/test/test-google/test-gui-gridlayout.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "gtest/gtest.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include <module-gui/gui/widgets/BoxLayout.hpp>
#include <module-gui/gui/widgets/GridLayout.hpp>
#include <gui/input/InputEvent.hpp>
M module-gui/test/test-google/test-gui-listview.cpp => module-gui/test/test-google/test-gui-listview.cpp +1 -1
@@ 9,7 9,7 @@
#include <gui/widgets/ListView.hpp>
#include <test/mock/TestListViewProvider.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
class ListViewTesting : public ::testing::Test
{
M module-os/CMakeLists.txt => module-os/CMakeLists.txt +1 -1
@@ 79,4 79,4 @@ if((${PROJECT_TARGET} STREQUAL "TARGET_RT1051") AND (${SYSTEM_VIEW_ENABLED}))
target_link_libraries(${PROJECT_NAME} PUBLIC segger::systemview)
endif()
-target_link_libraries(${PROJECT_NAME} PUBLIC module-utils)
+target_link_libraries(${PROJECT_NAME} PUBLIC log-api board-config)
M module-os/FreeRTOS/application.c => module-os/FreeRTOS/application.c +25 -26
@@ 1,6 1,6 @@
#include "FreeRTOS.h"
#include "task.h"
-#include <log.hpp>
+#include <log/log.hpp>
#include <assert.h>
#include <stdlib.h>
@@ 8,15 8,15 @@
/* configSUPPORT_STATIC_ALLOCATION is set to 1, so the application must provide an
implementation of vApplicationGetIdleTaskMemory() to provide the memory that is
used by the Idle task. */
-void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
- StackType_t **ppxIdleTaskStackBuffer,
- uint32_t *pulIdleTaskStackSize )
+void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer,
+ StackType_t **ppxIdleTaskStackBuffer,
+ uint32_t *pulIdleTaskStackSize)
{
-/* If the buffers to be provided to the Idle task are declared inside this
-function then they must be declared static - otherwise they will be allocated on
-the stack and so not exists after this function exits. */
-static StaticTask_t xIdleTaskTCB;
-static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
+ /* If the buffers to be provided to the Idle task are declared inside this
+ function then they must be declared static - otherwise they will be allocated on
+ the stack and so not exists after this function exits. */
+ static StaticTask_t xIdleTaskTCB;
+ static StackType_t uxIdleTaskStack[configMINIMAL_STACK_SIZE];
/* Pass out a pointer to the StaticTask_t structure in which the Idle task's
state will be stored. */
@@ 35,15 35,15 @@ static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
/* configSUPPORT_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
application must provide an implementation of vApplicationGetTimerTaskMemory()
to provide the memory that is used by the Timer service task. */
-void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer,
- StackType_t **ppxTimerTaskStackBuffer,
- uint32_t *pulTimerTaskStackSize )
+void vApplicationGetTimerTaskMemory(StaticTask_t **ppxTimerTaskTCBBuffer,
+ StackType_t **ppxTimerTaskStackBuffer,
+ uint32_t *pulTimerTaskStackSize)
{
-/* If the buffers to be provided to the Timer task are declared inside this
-function then they must be declared static - otherwise they will be allocated on
-the stack and so not exists after this function exits. */
-static StaticTask_t xTimerTaskTCB;
-static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
+ /* If the buffers to be provided to the Timer task are declared inside this
+ function then they must be declared static - otherwise they will be allocated on
+ the stack and so not exists after this function exits. */
+ static StaticTask_t xTimerTaskTCB;
+ static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];
/* Pass out a pointer to the StaticTask_t structure in which the Timer
task's state will be stored. */
@@ 58,18 58,18 @@ static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}
-#if( configUSE_MALLOC_FAILED_HOOK == 1 )
+#if (configUSE_MALLOC_FAILED_HOOK == 1)
/**
* @brief Redefinition of FreeRTOS malloc failed hook.
*/
-void vApplicationMallocFailedHook( void )
+void vApplicationMallocFailedHook(void)
{
- //LOG_FATAL("Task %s malloc failed ! \n", pcTaskGetName(NULL));
+ // LOG_FATAL("Task %s malloc failed ! \n", pcTaskGetName(NULL));
abort();
}
#endif
-#if( configCHECK_FOR_STACK_OVERFLOW > 0 )
+#if (configCHECK_FOR_STACK_OVERFLOW > 0)
/**
* @brief Redefinition of FreeRTOS stack overflow hook.
* Log error condition and invoke system restart procedure.
@@ 77,17 77,16 @@ void vApplicationMallocFailedHook( void )
* memory used by another task/tasks hence there is no certainty that
* system will be in healthy condition after task restore.
*/
-void vApplicationStackOverflowHook( TaskHandle_t xTask,
- signed char *pcTaskName )
+void vApplicationStackOverflowHook(TaskHandle_t xTask, signed char *pcTaskName)
{
(void)xTask;
- LOG_FATAL("Stack overflow:%s",pcTaskName);
+ LOG_FATAL("Stack overflow:%s", pcTaskName);
abort();
}
#endif
void vApplicationTickHook()
{
-// static uint8_t status = 0;
-// GPIO_PinWrite(base, pin, output)
+ // static uint8_t status = 0;
+ // GPIO_PinWrite(base, pin, output)
}
M module-os/FreeRTOS/include/FreeRTOSConfig.h => module-os/FreeRTOS/include/FreeRTOSConfig.h +72 -72
@@ 39,101 39,101 @@
*----------------------------------------------------------*/
#include <assert.h>
#include <stdint.h>
-#include <log.hpp>
+#include <log/log.hpp>
-//TODO: Look at tasks.c: void vTaskStepTick( const TickType_t xTicksToJump ) before upgrading FreeRTOS
+// TODO: Look at tasks.c: void vTaskStepTick( const TickType_t xTicksToJump ) before upgrading FreeRTOS
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-/* System clock frequency. */
-extern uint32_t SystemCoreClock;
+ /* System clock frequency. */
+ extern uint32_t SystemCoreClock;
#ifdef __cplusplus
}
#endif
-#define configUSE_PREEMPTION 1
-#define configUSE_TICKLESS_IDLE 0
-#define configCPU_CLOCK_HZ (SystemCoreClock)
-#define configTICK_RATE_HZ ((TickType_t)1000)
-#define configMAX_PRIORITIES 5
-#define configMINIMAL_STACK_SIZE ((unsigned short)128) //< Number of uint32_t's. So value of 128 will mean 512 bytes
-#define configMAX_TASK_NAME_LEN 64
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_TASK_NOTIFICATIONS 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 1
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configUSE_ALTERNATIVE_API 0 /* Deprecated! */
-#define configQUEUE_REGISTRY_SIZE 32
-#define configUSE_QUEUE_SETS 1
-#define configUSE_TIME_SLICING 1
+#define configUSE_PREEMPTION 1
+#define configUSE_TICKLESS_IDLE 0
+#define configCPU_CLOCK_HZ (SystemCoreClock)
+#define configTICK_RATE_HZ ((TickType_t)1000)
+#define configMAX_PRIORITIES 5
+#define configMINIMAL_STACK_SIZE ((unsigned short)128) //< Number of uint32_t's. So value of 128 will mean 512 bytes
+#define configMAX_TASK_NAME_LEN 64
+#define configUSE_16_BIT_TICKS 0
+#define configIDLE_SHOULD_YIELD 1
+#define configUSE_TASK_NOTIFICATIONS 1
+#define configUSE_MUTEXES 1
+#define configUSE_RECURSIVE_MUTEXES 1
+#define configUSE_COUNTING_SEMAPHORES 1
+#define configUSE_ALTERNATIVE_API 0 /* Deprecated! */
+#define configQUEUE_REGISTRY_SIZE 32
+#define configUSE_QUEUE_SETS 1
+#define configUSE_TIME_SLICING 1
#ifdef TARGET_Linux
-# define configUSE_NEWLIB_REENTRANT 0
+#define configUSE_NEWLIB_REENTRANT 0
#else
-# define configUSE_NEWLIB_REENTRANT 1
+#define configUSE_NEWLIB_REENTRANT 1
#endif
#define configENABLE_BACKWARD_COMPATIBILITY 1
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
#define configUSE_APPLICATION_TASK_TAG 0
/* Memory allocation related definitions. */
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 1
+#define configSUPPORT_STATIC_ALLOCATION 1
+#define configSUPPORT_DYNAMIC_ALLOCATION 1
#ifdef TARGET_Linux
-# define configTOTAL_HEAP_SIZE ((size_t)(1024*512))
+#define configTOTAL_HEAP_SIZE ((size_t)(1024 * 512))
#else
-# define configTOTAL_HEAP_SIZE ((size_t)(1024*386))
+#define configTOTAL_HEAP_SIZE ((size_t)(1024 * 386))
#endif
-#define configAPPLICATION_ALLOCATED_HEAP 0
+#define configAPPLICATION_ALLOCATED_HEAP 0
/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configUSE_MALLOC_FAILED_HOOK 1
-#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 0
+#define configCHECK_FOR_STACK_OVERFLOW 2
+#define configUSE_MALLOC_FAILED_HOOK 1
+#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 1
-#define configUSE_TRACE_FACILITY 1
-#define configUSE_STATS_FORMATTING_FUNCTIONS 1
-#define configRECORD_STACK_HIGH_ADDRESS 1
+#define configGENERATE_RUN_TIME_STATS 1
+#define configUSE_TRACE_FACILITY 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 1
+#define configRECORD_STACK_HIGH_ADDRESS 1
/* Co-routine related definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
+#define configUSE_CO_ROUTINES 0
+#define configMAX_CO_ROUTINE_PRIORITIES 2
/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY 0
-#define configTIMER_QUEUE_LENGTH 48
-#define configTIMER_TASK_STACK_DEPTH (1024)
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY 0
+#define configTIMER_QUEUE_LENGTH 48
+#define configTIMER_TASK_STACK_DEPTH (1024)
/* Define to trap errors during development. */
#ifndef NDEBUG
-# define configASSERT(x) assert(x)
+#define configASSERT(x) assert(x)
#endif
-
/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 1
-#define INCLUDE_xTaskGetCurrentTaskHandle 1
-#define INCLUDE_uxTaskGetStackHighWaterMark 1
-#define INCLUDE_uxTaskGetStackHighWaterMark2 1
-#define INCLUDE_xTaskGetIdleTaskHandle 1
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xTimerPendFunctionCall 1
-#define INCLUDE_xTaskAbortDelay 0
-#define INCLUDE_xTaskGetHandle 0
-#define INCLUDE_xTaskResumeFromISR 1
+#define INCLUDE_vTaskPrioritySet 1
+#define INCLUDE_uxTaskPriorityGet 1
+#define INCLUDE_vTaskDelete 1
+#define INCLUDE_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_xTaskGetSchedulerState 1
+#define INCLUDE_xTaskGetCurrentTaskHandle 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+#define INCLUDE_uxTaskGetStackHighWaterMark2 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_eTaskGetState 0
+#define INCLUDE_xTimerPendFunctionCall 1
+#define INCLUDE_xTaskAbortDelay 0
+#define INCLUDE_xTaskGetHandle 0
+#define INCLUDE_xTaskResumeFromISR 1
#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
@@ 161,30 161,30 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
-#define vPortSVCHandler SVC_Handler
-#define xPortPendSVHandler PendSV_Handler
+#define vPortSVCHandler SVC_Handler
+#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler
/* if this is 0 then tickless idle will not fire */
-#define configPRE_SLEEP_PROCESSING vPortPRE_SLEEP_PROCESSING
-#define configPOST_SLEEP_PROCESSING vPortPOST_SLEEP_PROCESSING
+#define configPRE_SLEEP_PROCESSING vPortPRE_SLEEP_PROCESSING
+#define configPOST_SLEEP_PROCESSING vPortPOST_SLEEP_PROCESSING
//#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 100
-#define configSYSTICK_CLOCK_HZ (100000U)
+#define configSYSTICK_CLOCK_HZ (100000U)
/* Low power Tickless idle. Low power timer (GPT) is initialized in application code. */
-#define configGPT_CLOCK_HZ (32768U)
+#define configGPT_CLOCK_HZ (32768U)
/* system heap integrity check */
#ifdef DEBUG_FREERTOS
-#define configSYSTEM_HEAP_STATS (1)
-#define configUSER_HEAP_STATS (1)
-#define configSYSTEM_HEAP_INTEGRITY_CHECK (1)
+#define configSYSTEM_HEAP_STATS (1)
+#define configUSER_HEAP_STATS (1)
+#define configSYSTEM_HEAP_INTEGRITY_CHECK (1)
#define PROJECT_CONFIG_HEAP_INTEGRITY_CHECKS (1)
#endif
extern void vConfigureTimerForRunTimeStats(void);
extern uint32_t ulHighFrequencyTimerTicks(void);
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
-#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks()
+#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks()
#endif /* FREERTOS_CONFIG_H */
M module-os/board/rt1051/CMakeLists.txt => module-os/board/rt1051/CMakeLists.txt +1 -0
@@ 31,5 31,6 @@ target_include_directories(
target_link_libraries(module-os
PUBLIC
+ fsl
cmsis
)
M module-os/board/rt1051/_exit.c => module-os/board/rt1051/_exit.c +6 -7
@@ 32,23 32,22 @@
#include <FreeRTOS.h>
#include <MIMXRT1051.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <task.h>
#include <macros.h>
// ----------------------------------------------------------------------------
// Forward declaration
-void
-_exit(int code);
+void _exit(int code);
// ----------------------------------------------------------------------------
-
void __reset_hardware(void)
{
- // Let watchdog reset system
- while(1);
+ // Let watchdog reset system
+ while (1)
+ ;
}
// On Release, call the hardware reset procedure.
@@ 64,7 63,7 @@ void __attribute__((weak)) _exit(int code)
haltIfDebugging();
vTaskEndScheduler();
#ifdef DEBUG
- while(1){};
+ while (1) {};
#endif
}
M module-os/board/rt1051/systemview/FreeRTOSConfig.h => module-os/board/rt1051/systemview/FreeRTOSConfig.h +55 -51
@@ 39,14 39,15 @@
*----------------------------------------------------------*/
#include <assert.h>
#include <stdint.h>
-#include <log.hpp>
+#include <log/log.hpp>
-//TODO: Look at tasks.c: void vTaskStepTick( const TickType_t xTicksToJump ) before upgrading FreeRTOS
+// TODO: Look at tasks.c: void vTaskStepTick( const TickType_t xTicksToJump ) before upgrading FreeRTOS
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-/* System clock frequency. */
-extern uint32_t SystemCoreClock;
+ /* System clock frequency. */
+ extern uint32_t SystemCoreClock;
#ifdef __cplusplus
}
#endif
@@ 56,7 57,7 @@ extern uint32_t SystemCoreClock;
#define configCPU_CLOCK_HZ (SystemCoreClock)
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configMAX_PRIORITIES 5
-#define configMINIMAL_STACK_SIZE ((unsigned short)128) //< Number of uint32_t's. So value of 128 will mean 512 bytes
+#define configMINIMAL_STACK_SIZE ((unsigned short)128) //< Number of uint32_t's. So value of 128 will mean 512 bytes
#define configMAX_TASK_NAME_LEN 64
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
@@ 74,55 75,59 @@ extern uint32_t SystemCoreClock;
#define configUSE_APPLICATION_TASK_TAG 0
/* Memory allocation related definitions. */
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 1
-#define configTOTAL_HEAP_SIZE ((size_t)(1024*324))
-#define configAPPLICATION_ALLOCATED_HEAP 0
+#define configSUPPORT_STATIC_ALLOCATION 1
+#define configSUPPORT_DYNAMIC_ALLOCATION 1
+#define configTOTAL_HEAP_SIZE ((size_t)(1024 * 324))
+#define configAPPLICATION_ALLOCATED_HEAP 0
/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configUSE_MALLOC_FAILED_HOOK 0
-#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
+#define configUSE_IDLE_HOOK 0
+#define configUSE_TICK_HOOK 0
+#define configCHECK_FOR_STACK_OVERFLOW 2
+#define configUSE_MALLOC_FAILED_HOOK 0
+#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 1
-#define configUSE_TRACE_FACILITY 1
-#define configUSE_STATS_FORMATTING_FUNCTIONS 1
-#define configRECORD_STACK_HIGH_ADDRESS 1
+#define configGENERATE_RUN_TIME_STATS 1
+#define configUSE_TRACE_FACILITY 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 1
+#define configRECORD_STACK_HIGH_ADDRESS 1
/* Co-routine related definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
+#define configUSE_CO_ROUTINES 0
+#define configMAX_CO_ROUTINE_PRIORITIES 2
/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY 0
-#define configTIMER_QUEUE_LENGTH 48
-#define configTIMER_TASK_STACK_DEPTH (1024)
+#define configUSE_TIMERS 1
+#define configTIMER_TASK_PRIORITY 0
+#define configTIMER_QUEUE_LENGTH 48
+#define configTIMER_TASK_STACK_DEPTH (1024)
/* Define to trap errors during development. */
-#define configASSERT(x) if((x) == 0) {LOG_FATAL("Assertion: %s",x); while(1);}
-
+#define configASSERT(x) \
+ if ((x) == 0) { \
+ LOG_FATAL("Assertion: %s", x); \
+ while (1) \
+ ; \
+ }
/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 1
-#define INCLUDE_xTaskGetCurrentTaskHandle 1
-#define INCLUDE_uxTaskGetStackHighWaterMark 1
-#define INCLUDE_uxTaskGetStackHighWaterMark2 1
-#define INCLUDE_xTaskGetIdleTaskHandle 1
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xTimerPendFunctionCall 1
-#define INCLUDE_xTaskAbortDelay 0
-#define INCLUDE_xTaskGetHandle 0
-#define INCLUDE_xTaskResumeFromISR 1
+#define INCLUDE_vTaskPrioritySet 1
+#define INCLUDE_uxTaskPriorityGet 1
+#define INCLUDE_vTaskDelete 1
+#define INCLUDE_vTaskSuspend 1
+#define INCLUDE_vTaskDelayUntil 1
+#define INCLUDE_vTaskDelay 1
+#define INCLUDE_xTaskGetSchedulerState 1
+#define INCLUDE_xTaskGetCurrentTaskHandle 1
+#define INCLUDE_uxTaskGetStackHighWaterMark 1
+#define INCLUDE_uxTaskGetStackHighWaterMark2 1
+#define INCLUDE_xTaskGetIdleTaskHandle 1
+#define INCLUDE_eTaskGetState 0
+#define INCLUDE_xTimerPendFunctionCall 1
+#define INCLUDE_xTaskAbortDelay 0
+#define INCLUDE_xTaskGetHandle 0
+#define INCLUDE_xTaskResumeFromISR 1
#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
@@ 150,26 155,25 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
-#define vPortSVCHandler SVC_Handler
-#define xPortPendSVHandler PendSV_Handler
+#define vPortSVCHandler SVC_Handler
+#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler
/* if this is 0 then tickless idle will not fire */
-#define configPRE_SLEEP_PROCESSING vPortPRE_SLEEP_PROCESSING
-#define configPOST_SLEEP_PROCESSING vPortPOST_SLEEP_PROCESSING
+#define configPRE_SLEEP_PROCESSING vPortPRE_SLEEP_PROCESSING
+#define configPOST_SLEEP_PROCESSING vPortPOST_SLEEP_PROCESSING
//#define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 100
-#define configSYSTICK_CLOCK_HZ (100000U)
+#define configSYSTICK_CLOCK_HZ (100000U)
/* Low power Tickless idle. Low power timer (GPT) is initialized in application code. */
-#define configGPT_CLOCK_HZ (32768U)
+#define configGPT_CLOCK_HZ (32768U)
#if SYSTEM_VIEW_ENABLED
#include <FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.h>
#endif
-
extern uint32_t ulHighFrequencyTimerTicks(void);
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
-#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks()
+#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTimerTicks()
#endif /* FREERTOS_CONFIG_H */
M module-os/memory/usermem.c => module-os/memory/usermem.c +1 -1
@@ 16,7 16,7 @@
* Sets heap size in SDRAM
*/
#ifndef PROJECT_CONFIG_USER_DYNMEM_SIZE
-#define USERMEM_TOTAL_HEAP_SIZE 0
+#error "Define user heap size!"
#else
#define USERMEM_TOTAL_HEAP_SIZE PROJECT_CONFIG_USER_DYNMEM_SIZE
#endif
M module-platform/CMakeLists.txt => module-platform/CMakeLists.txt +3 -0
@@ 19,6 19,9 @@ target_sources(
target_link_libraries(
platform
+ PUBLIC
+ board
+
PRIVATE
module-bsp
)
M module-platform/linux/tests/CMakeLists.txt => module-platform/linux/tests/CMakeLists.txt +2 -0
@@ 43,6 43,7 @@ add_catch2_executable(
${CMAKE_CURRENT_LIST_DIR}/unittest_filesystem_littlefs.cpp
LIBS
platform
+ module-vfs
DEPS
${LITTLEFS_IMAGE}
USE_FS
@@ 54,6 55,7 @@ add_catch2_executable(
${CMAKE_CURRENT_LIST_DIR}/unittest_filesystem_dualmount.cpp
LIBS
platform
+ module-vfs
DEPS
${LITTLEFS_IMAGE}
USE_FS
M module-services/CMakeLists.txt => module-services/CMakeLists.txt +1 -1
@@ 33,7 33,7 @@ target_link_libraries(${PROJECT_NAME}
service-antenna
${TARGET_LIBRARIES}
PRIVATE
- time
+ utils-time
)
# Board specific compilation definitions,options,include directories and features
M module-services/service-antenna/ServiceAntenna.cpp => module-services/service-antenna/ServiceAntenna.cpp +1 -1
@@ 8,7 8,7 @@
#include <at/response.hpp>
#include <EventStore.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <MessageType.hpp>
#include <Timers/TimerFactory.hpp>
#include <projdefs.h>
M module-services/service-appmgr/CMakeLists.txt => module-services/service-appmgr/CMakeLists.txt +2 -2
@@ 72,7 72,6 @@ target_sources(service-appmgr
target_link_libraries(service-appmgr
PRIVATE
- apps-common
application-special-input
json::json
module-audio
@@ 80,7 79,8 @@ target_link_libraries(service-appmgr
service-db
service-gui
PUBLIC
- time
+ apps-common
+ utils-time
)
target_include_directories(service-appmgr
M module-services/service-appmgr/model/ActionsRegistry.cpp => module-services/service-appmgr/model/ActionsRegistry.cpp +1 -1
@@ 3,7 3,7 @@
#include "ActionsRegistry.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <magic_enum.hpp>
#include <cassert>
M module-services/service-appmgr/model/ApplicationManagerCommon.cpp => module-services/service-appmgr/model/ApplicationManagerCommon.cpp +1 -1
@@ 18,7 18,7 @@
#include <log/log.hpp>
#include <service-audio/AudioMessage.hpp>
#include <service-db/agents/settings/SystemSettings.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <service-appmgr/Constants.hpp>
#include <service-desktop/Constants.hpp>
#include <service-desktop/DesktopMessages.hpp>
M module-services/service-audio/AudioServiceAPI.cpp => module-services/service-audio/AudioServiceAPI.cpp +1 -1
@@ 6,7 6,7 @@
#include <ServiceAudio.hpp>
#include <Audio/decoder/Decoder.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Service/Common.hpp>
#include <utility>
M module-services/service-bluetooth/ServiceBluetooth.cpp => module-services/service-bluetooth/ServiceBluetooth.cpp +1 -1
@@ 26,7 26,7 @@
#include "SystemManager/messages/SentinelRegistrationMessage.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <bits/exception.h>
#include <utility>
#include <service-desktop/DesktopMessages.hpp>
M module-services/service-bluetooth/service-bluetooth/SettingsHolder.hpp => module-services/service-bluetooth/service-bluetooth/SettingsHolder.hpp +2 -2
@@ 5,7 5,7 @@
#include <string>
#include <variant>
#include <service-db/Settings.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include "SettingsSerializer.hpp"
namespace bluetooth
@@ 90,4 90,4 @@ namespace bluetooth
std::unique_ptr<settings::Settings> settingsProvider;
std::map<Settings, SettingEntry> settingsMap;
};
-} // namespace Bluetooth
+} // namespace bluetooth
M module-services/service-bluetooth/service-bluetooth/SettingsSerializer.cpp => module-services/service-bluetooth/service-bluetooth/SettingsSerializer.cpp +2 -2
@@ 3,7 3,7 @@
#include "SettingsSerializer.hpp"
#include "btstack_util.h"
-#include <log.hpp>
+#include <log/log.hpp>
namespace strings
{
@@ 40,7 40,7 @@ auto SettingsSerializer::fromString(const std::string &jsonStr) -> std::vector<D
for (auto &device : devicesArray) {
Devicei temp;
sscanf_bd_addr(device[strings::addr].string_value().c_str(), temp.address);
- temp.name = device[strings::name].string_value();
+ temp.name = device[strings::name].string_value();
temp.deviceState = DeviceState::Paired;
devicesVector.emplace_back(temp);
}
M module-services/service-cellular/CMakeLists.txt => module-services/service-cellular/CMakeLists.txt +2 -1
@@ 62,10 62,11 @@ target_link_libraries(${PROJECT_NAME}
service-evtmgr
ucs2
json::json
- time
+ utils-time
PUBLIC
eventstore
utf8
+ hal
)
if (${ENABLE_TESTS})
M module-services/service-cellular/CellularCall.cpp => module-services/service-cellular/CellularCall.cpp +1 -1
@@ 6,7 6,7 @@
#include <CalllogRecord.hpp>
#include <PhoneNumber.hpp>
#include <Utils.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <cinttypes>
#include <ctime>
M module-services/service-cellular/RequestFactory.cpp => module-services/service-cellular/RequestFactory.cpp +1 -1
@@ 6,7 6,7 @@
#include <re2/re2.h>
#include <at/Commands.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include "service-cellular/requests/CallRequest.hpp"
#include "service-cellular/requests/SupplementaryServicesRequest.hpp"
M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +2 -2
@@ 40,7 40,7 @@
#include <Tables/CalllogTable.hpp>
#include <Tables/Record.hpp>
#include <Utils.hpp>
-#include <utility/Utility.hpp>
+#include <Utility.hpp>
#include <at/cmd/CLCC.hpp>
#include <at/cmd/CFUN.hpp>
#include <at/UrcClip.hpp>
@@ 54,7 54,7 @@
#include <bsp/cellular/bsp_cellular.hpp>
#include <EventStore.hpp>
#include <country.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <at/UrcFactory.hpp>
#include <queries/messages/sms/QuerySMSSearchByType.hpp>
#include <queries/notifications/QueryNotificationsIncrement.hpp>
M module-services/service-cellular/SignalStrength.cpp => module-services/service-cellular/SignalStrength.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "service-cellular/SignalStrength.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
SignalStrength::SignalStrength(int rssi)
{
M module-services/service-cellular/include/service-cellular/api/common.hpp => module-services/service-cellular/include/service-cellular/api/common.hpp +3 -5
@@ 3,6 3,8 @@
#pragma once
+#include <hal/cellular/SIM.hpp>
+
#include <vector>
namespace cellular
@@ 26,11 28,7 @@ namespace cellular
Disabled
};
- enum class SimSlot
- {
- SIM1 = 0,
- SIM2 = 1
- };
+ using SimSlot = hal::cellular::SimSlot;
enum class ModemState
{
M module-services/service-cellular/src/ImeiGetHandler.cpp => module-services/service-cellular/src/ImeiGetHandler.cpp +0 -2
@@ 5,8 5,6 @@
#include <ATFactory.hpp>
#include <modem/BaseChannel.hpp>
-#include <log/Logger.hpp>
-
namespace
{
constexpr auto IMEIResonseSize = 2;
M module-services/service-cellular/src/NetworkTime.cpp => module-services/service-cellular/src/NetworkTime.cpp +0 -1
@@ 9,7 9,6 @@
#include <service-time/service-time/TimeMessage.hpp>
-#include <log/Logger.hpp>
namespace cellular::service
{
M module-services/service-cellular/src/SMSPartsHandler.cpp => module-services/service-cellular/src/SMSPartsHandler.cpp +1 -1
@@ 4,7 4,7 @@
#include "SMSPartsHandler.hpp"
#include <service-cellular/service-cellular/MessageConstants.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace cellular::internal::sms
{
M module-services/service-cellular/src/SimContacts.cpp => module-services/service-cellular/src/SimContacts.cpp +0 -1
@@ 7,7 7,6 @@
#include <at/cmd/CPBS.hpp>
#include <at/cmd/CPBR.hpp>
-#include <log/Logger.hpp>
namespace cellular::service
{
void SimContacts::setChannel(at::BaseChannel *channel)
M module-services/service-db/DBServiceAPI.cpp => module-services/service-db/DBServiceAPI.cpp +1 -1
@@ 18,7 18,7 @@
#include <Tables/CountryCodesTable.hpp>
#include <ThreadRecord.hpp>
#include <Utils.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <queries/messages/threads/QueryThreadGetByNumber.hpp>
#include <utility>
M module-services/service-db/agents/settings/FactorySettings.cpp => module-services/service-db/agents/settings/FactorySettings.cpp +1 -1
@@ 3,7 3,7 @@
#include "FactorySettings.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-db/SettingsMessages.hpp>
namespace settings
M module-services/service-db/agents/settings/Settings.cpp => module-services/service-db/agents/settings/Settings.cpp +1 -1
@@ 10,7 10,7 @@
#include <vector>
#if defined(DEBUG_SETTINGS_DB) and DEBUG_SETTINGS_DB == 1
-#include <log.hpp>
+#include <log/log.hpp>
#define log_debug(...) LOG_DEBUG(__VA_ARGS__);
#else
#define log_debug(...)
M module-services/service-desktop/ServiceDesktop.cpp => module-services/service-desktop/ServiceDesktop.cpp +1 -1
@@ 13,7 13,7 @@
#include <MessageType.hpp>
#include <Service/Worker.hpp>
#include <json11.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <application-desktop/Constants.hpp>
#include <locks/data/PhoneLockMessages.hpp>
#include <service-appmgr/Constants.hpp>
M module-services/service-desktop/WorkerDesktop.cpp => module-services/service-desktop/WorkerDesktop.cpp +1 -1
@@ 10,7 10,7 @@
#include "Timers/TimerFactory.hpp"
#include <bsp/usb/usb.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <crc32.h>
#include <map>
M module-services/service-desktop/endpoints/CMakeLists.txt => module-services/service-desktop/endpoints/CMakeLists.txt +2 -0
@@ 96,7 96,9 @@ target_link_libraries(
desktop-endpoints
PUBLIC
endpoint-message-sender
+ sys-service
PRIVATE
microtar
base64::base64
+ version-header
)
M module-services/service-desktop/endpoints/HttpEnums.cpp => module-services/service-desktop/endpoints/HttpEnums.cpp +1 -1
@@ 3,7 3,7 @@
#include <endpoints/HttpEnums.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace sdesktop::endpoints::http
{
M module-services/service-desktop/endpoints/backup/BackupRestore.cpp => module-services/service-desktop/endpoints/backup/BackupRestore.cpp +2 -2
@@ 4,12 4,12 @@
#include <endpoints/backup/BackupRestore.hpp>
#include <SystemManager/SystemManagerCommon.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <microtar.hpp>
#include <purefs/filesystem_paths.hpp>
#include <service-db/DBServiceAPI.hpp>
#include <service-db/DBServiceName.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <cassert>
#include <filesystem>
M module-services/service-desktop/endpoints/contacts/ContactHelper.cpp => module-services/service-desktop/endpoints/contacts/ContactHelper.cpp +1 -1
@@ 14,7 14,7 @@
#include <ContactRecord.hpp>
#include <PhoneNumber.hpp>
#include <Service/Common.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <queries/RecordQuery.hpp>
#include <queries/phonebook/QueryContactGetByID.hpp>
#include <queries/phonebook/QueryContactUpdate.hpp>
M module-services/service-desktop/endpoints/developerMode/DeveloperModeEndpoint.cpp => module-services/service-desktop/endpoints/developerMode/DeveloperModeEndpoint.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <endpoints/developerMode/DeveloperModeEndpoint.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <endpoints/message/Sender.hpp>
M module-services/service-desktop/endpoints/developerMode/Mode/UI_Helper.cpp => module-services/service-desktop/endpoints/developerMode/Mode/UI_Helper.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <endpoints/developerMode/Mode/UI_Helper.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include "service-desktop/Constants.hpp"
#include "service-desktop/DeveloperModeMessage.hpp"
#include <service-appmgr/Constants.hpp>
M module-services/service-desktop/endpoints/developerMode/fs/FS_Helper.cpp => module-services/service-desktop/endpoints/developerMode/fs/FS_Helper.cpp +1 -1
@@ 3,7 3,7 @@
#include <endpoints/developerMode/fs/FS_Helper.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-desktop/Constants.hpp>
#include <service-desktop/DeveloperModeMessage.hpp>
#include <endpoints/message/Sender.hpp>
M module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpoint.cpp => module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpoint.cpp +1 -1
@@ 6,7 6,7 @@
#include <endpoints/JsonKeyNames.hpp>
#include <EventStore.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
#include <service-desktop/ServiceDesktop.hpp>
#include <version.hpp>
M module-services/service-desktop/endpoints/filesystem/FileContext.cpp => module-services/service-desktop/endpoints/filesystem/FileContext.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <endpoints/filesystem/FileContext.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
FileContext::FileContext(
std::filesystem::path path, std::size_t size, std::size_t chunkSize, std::string openMode, std::size_t offset)
M module-services/service-desktop/endpoints/filesystem/FileOperations.cpp => module-services/service-desktop/endpoints/filesystem/FileOperations.cpp +1 -1
@@ 3,7 3,7 @@
#include <endpoints/filesystem/FileOperations.hpp>
#include <base64.h>
-#include <log.hpp>
+#include <log/log.hpp>
FileOperations &FileOperations::instance()
{
M module-services/service-desktop/endpoints/update/UpdateHelper.cpp => module-services/service-desktop/endpoints/update/UpdateHelper.cpp +1 -1
@@ 3,7 3,7 @@
#include <endpoints/update/UpdateHelper.hpp>
#include <endpoints/Context.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <SystemManager/SystemManagerCommon.hpp>
#include <purefs/filesystem_paths.hpp>
M module-services/service-desktop/message-common/include/endpoints/message/Common.hpp => module-services/service-desktop/message-common/include/endpoints/message/Common.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <log.hpp>
+#include <log/log.hpp>
#include <string>
#include <json11.hpp>
M module-services/service-desktop/parser/MessageHandler.cpp => module-services/service-desktop/parser/MessageHandler.cpp +1 -1
@@ 5,7 5,7 @@
#include <endpoints/EndpointFactory.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
M module-services/service-desktop/parser/ParserFSM.cpp => module-services/service-desktop/parser/ParserFSM.cpp +1 -1
@@ 3,7 3,7 @@
#include "ParserFSM.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <string>
M module-services/service-eink/ServiceEink.cpp => module-services/service-eink/ServiceEink.cpp +1 -1
@@ 9,7 9,7 @@
#include <time/ScopedTime.hpp>
#include <Timers/TimerFactory.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <messages/EinkMessage.hpp>
#include <messages/ImageMessage.hpp>
#include <SystemManager/messages/DeviceRegistrationMessage.hpp>
M module-services/service-evtmgr/CMakeLists.txt => module-services/service-evtmgr/CMakeLists.txt +1 -0
@@ 28,6 28,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PRIVATE
+ log
module-apps
module-gui
module-utils
M module-services/service-evtmgr/EventManager.cpp => module-services/service-evtmgr/EventManager.cpp +1 -1
@@ 19,7 19,7 @@
#include <bsp/common.hpp>
#include <bsp/rtc/rtc.hpp>
#include <hal/key_input/KeyEventDefinitions.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Logger.hpp>
#include <service-appmgr/Controller.hpp>
#include <service-audio/AudioMessage.hpp>
M module-services/service-evtmgr/WorkerEventCommon.cpp => module-services/service-evtmgr/WorkerEventCommon.cpp +2 -2
@@ 21,9 21,9 @@
#include <bsp/eink_frontlight/eink_frontlight.hpp>
#include <EventStore.hpp>
-#include <common_data/RawKey.hpp>
+#include <hal/key_input/RawKey.hpp>
#include <headset.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-audio/AudioMessage.hpp>
#include <service-desktop/Constants.hpp>
#include <service-desktop/DesktopMessages.hpp>
M module-services/service-evtmgr/service-evtmgr/EventManagerCommon.hpp => module-services/service-evtmgr/service-evtmgr/EventManagerCommon.hpp +1 -1
@@ 5,7 5,7 @@
#include "Constants.hpp"
-#include <common_data/RawKey.hpp>
+#include <hal/key_input/RawKey.hpp>
#include <MessageType.hpp>
#include <Service/Common.hpp>
#include <Service/Message.hpp>
M module-services/service-evtmgr/service-evtmgr/KbdMessage.hpp => module-services/service-evtmgr/service-evtmgr/KbdMessage.hpp +1 -1
@@ 5,7 5,7 @@
#include "Service/Message.hpp"
-#include <common_data/RawKey.hpp>
+#include <hal/key_input/RawKey.hpp>
namespace sevm
{
M module-services/service-gui/ServiceGUI.cpp => module-services/service-gui/ServiceGUI.cpp +4 -4
@@ 12,7 12,7 @@
#include <DrawCommand.hpp>
#include <FontManager.hpp>
#include <gui/core/ImageManager.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <service-eink/Common.hpp>
#include <service-eink/messages/ImageMessage.hpp>
#include <service-eink/messages/EinkMessage.hpp>
@@ 190,9 190,9 @@ namespace service::gui
sys::MessagePointer ServiceGUI::handleGUIRenderingFinished(sys::Message *message)
{
- auto finishedMsg = static_cast<service::gui::RenderingFinished *>(message);
- const auto contextId = finishedMsg->getContextId();
- auto refreshMode = finishedMsg->getRefreshMode();
+ auto finishedMsg = static_cast<service::gui::RenderingFinished *>(message);
+ const auto contextId = finishedMsg->getContextId();
+ auto refreshMode = finishedMsg->getRefreshMode();
if (isInState(State::Idle)) {
if (cache.isRenderCached()) {
refreshMode = getMaxRefreshMode(cache.getCachedRender()->refreshMode, refreshMode);
M module-services/service-gui/WorkerGUI.cpp => module-services/service-gui/WorkerGUI.cpp +1 -1
@@ 4,7 4,7 @@
#include "WorkerGUI.hpp"
#include <DrawCommand.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Renderer.hpp>
#include <Service/Worker.hpp>
#include <service-gui/ServiceGUI.hpp>
M module-services/service-time/CMakeLists.txt => module-services/service-time/CMakeLists.txt +1 -1
@@ 30,7 30,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PRIVATE
module-db
- time
+ utils-time
service-db
service-time-api
module-sys
M module-services/service-time/ServiceTime.cpp => module-services/service-time/ServiceTime.cpp +1 -1
@@ 12,7 12,7 @@
#include <BaseInterface.hpp>
#include <Common/Query.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <MessageType.hpp>
#include <module-db/Interface/EventRecord.hpp>
#include <service-db/DBNotificationMessage.hpp>
M module-services/service-time/api/CMakeLists.txt => module-services/service-time/api/CMakeLists.txt +1 -1
@@ 9,6 9,6 @@ target_sources(service-time-api
target_link_libraries(service-time-api
PRIVATE
- time
+ utils-time
service-time
)
M module-services/service-time/internal/StaticData.hpp => module-services/service-time/internal/StaticData.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/time/time/time_locale.hpp>
+#include <time/time_locale.hpp>
namespace stm::internal
{
M module-sys/Service/CMakeLists.txt => module-sys/Service/CMakeLists.txt +13 -2
@@ 1,9 1,16 @@
add_library(sys-service STATIC)
+add_library(sys-service-common INTERFACE)
+
+target_sources(sys-service-common INTERFACE include/Service/Common.hpp)
+target_include_directories(sys-service-common
+ INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+)
target_sources(sys-service
PUBLIC
include/Service/BusProxy.hpp
- include/Service/Common.hpp
+
include/Service/CpuSentinel.hpp
include/Service/Mailbox.hpp
include/Service/MessageForward.hpp
@@ 36,8 43,12 @@ target_include_directories(sys-service
target_link_libraries(sys-service
PUBLIC
messagetype
- magic_enum::magic_enum
+ module-bsp
module-os
+ sys-service-common
+ sys-watchdog
+
+ magic_enum::magic_enum
)
if (${ENABLE_TESTS})
M module-sys/Service/Service.cpp => module-sys/Service/Service.cpp +2 -2
@@ 10,8 10,8 @@
#include "Timers/SystemTimer.hpp"
#include "Timers/TimerHandle.hpp" // for Timer
#include "Timers/TimerMessage.hpp" // for TimerMessage
-#include "log/debug.hpp" // for DEBUG_SERVICE_MESSAGES
-#include <log.hpp> // for LOG_ERROR, LOG_DEBUG, LOG_FATAL
+#include <log/debug.hpp> // for DEBUG_SERVICE_MESSAGES
+#include <log/log.hpp> // for LOG_ERROR, LOG_DEBUG, LOG_FATAL
#include "mutex.hpp" // for cpp_freertos
#include "portmacro.h" // for UBaseType_t
#include "thread.hpp" // for Thread
M module-sys/SystemManager/CMakeLists.txt => module-sys/SystemManager/CMakeLists.txt +1 -0
@@ 35,6 35,7 @@ target_include_directories(sys-manager
target_link_libraries(sys-manager
PUBLIC
+ eventstore
sys-service
)
M module-sys/SystemManager/CpuGovernor.cpp => module-sys/SystemManager/CpuGovernor.cpp +1 -1
@@ 3,7 3,7 @@
#include <SystemManager/CpuGovernor.hpp>
#include <algorithm>
-#include <log.hpp>
+#include <log/log.hpp>
namespace sys
{
M module-sys/SystemManager/CpuStatistics.cpp => module-sys/SystemManager/CpuStatistics.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <SystemManager/CpuStatistics.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <FreeRTOS.h>
#include <task.h>
#include <limits>
M module-sys/SystemManager/DeviceManager.cpp => module-sys/SystemManager/DeviceManager.cpp +1 -1
@@ 3,7 3,7 @@
#include <SystemManager/DeviceManager.hpp>
#include <algorithm>
-#include <log.hpp>
+#include <log/log.hpp>
namespace sys
{
M module-sys/SystemManager/PowerManager.cpp => module-sys/SystemManager/PowerManager.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <SystemManager/PowerManager.hpp>
M module-sys/SystemManager/include/SystemManager/SystemManagerCommon.hpp => module-sys/SystemManager/include/SystemManager/SystemManagerCommon.hpp +1 -1
@@ 13,7 13,7 @@
#include "Service/ServiceCreator.hpp"
#include "Timers/TimerHandle.hpp"
#include "PowerManager.hpp"
-#include <common_data/RawKey.hpp>
+#include <hal/key_input/RawKey.hpp>
#include "Constants.hpp"
#include "CpuStatistics.hpp"
#include "DeviceManager.hpp"
M module-sys/SystemWatchdog/CMakeLists.txt => module-sys/SystemWatchdog/CMakeLists.txt +1 -1
@@ 15,7 15,7 @@ target_include_directories(sys-watchdog
target_link_libraries(sys-watchdog
PUBLIC
- sys-service
+ sys-service-common
PRIVATE
module-bsp
M module-sys/SystemWatchdog/SystemWatchdog.cpp => module-sys/SystemWatchdog/SystemWatchdog.cpp +1 -1
@@ 6,7 6,7 @@
#include "critical.hpp"
#include "ticks.hpp"
#include "bsp/watchdog/watchdog.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace sys
{
M module-sys/Timers/CMakeLists.txt => module-sys/Timers/CMakeLists.txt +1 -0
@@ 21,5 21,6 @@ target_include_directories(sys-timers
target_link_libraries(sys-timers
PUBLIC
+ sys-service
module-os
)
M module-sys/Timers/SystemTimer.cpp => module-sys/Timers/SystemTimer.cpp +1 -1
@@ 4,7 4,7 @@
#include <Timers/SystemTimer.hpp>
#include <Service/Service.hpp>
#include <Timers/TimerMessage.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <projdefs.h>
#include <memory>
M module-sys/Timers/TimerHandle.cpp => module-sys/Timers/TimerHandle.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <Timers/TimerHandle.hpp>
-#include <module-utils/log/log.hpp>
+#include <log/log.hpp>
namespace sys
{
M module-utils/CMakeLists.txt => module-utils/CMakeLists.txt +23 -51
@@ 1,61 1,33 @@
-project(module-utils VERSION 1.0)
+module_is_test_entity()
-if(${CMAKE_VERSION} VERSION_LESS 3.12)
- cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
-endif()
+add_library(module-utils INTERFACE)
-module_is_test_entity()
-
-set (SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/PhoneNumber.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/PhoneNumber.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/NumberHolderMatcher.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/country.hpp
- ${CMAKE_CURRENT_SOURCE_DIR}/ical/ParserICS.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/Utils.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/circular_buffer/StringCircularBuffer.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/generators/RandomStringGenerator.cpp
-)
-
-add_library(${PROJECT_NAME} STATIC ${SOURCES})
-
-target_link_libraries(${PROJECT_NAME}
-PUBLIC
- application-calendar
- board
- libphonenumber::libphonenumber
- log
- magic_enum
- module-os
- module-vfs
-PRIVATE
- hash-library::hash-library
- json::json
- time
-)
-
-# Board specific compilation definitions,options,include directories and features
-target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_CONFIG_DEFINITIONS})
-target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_TARGET})
-target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_INCLUDES})
-target_include_directories(${PROJECT_NAME}
- PUBLIC
-
- ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-if (${ENABLE_TESTS})
- add_subdirectory( test )
-endif()
-
-add_subdirectory(board)
add_subdirectory(bootconfig)
add_subdirectory(Clipboard)
add_subdirectory(EventStore)
add_subdirectory(i18n)
+add_subdirectory(ical)
+add_subdirectory(locale)
add_subdirectory(log)
add_subdirectory(math)
+add_subdirectory(phonenumber)
add_subdirectory(rrule)
add_subdirectory(time)
-add_subdirectory(ucs2)
-add_subdirectory(utf8)
+add_subdirectory(unicode)
+add_subdirectory(utility)
+
+target_link_libraries(module-utils
+ INTERFACE
+ clipboard
+ i18n
+ log-api
+ rrule
+ utility
+ utils-bootconfig
+ utils-calendar
+ utils-locale
+ utils-math
+ utils-phonenumber
+ utils-time
+ utils-unicode
+)
M module-utils/EventStore/CMakeLists.txt => module-utils/EventStore/CMakeLists.txt +3 -0
@@ 11,6 11,9 @@ target_include_directories(eventstore
)
target_link_libraries(eventstore
+ PUBLIC
+ hal
+
PRIVATE
module-os
)
M module-utils/EventStore/EventStore.cpp => module-utils/EventStore/EventStore.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "EventStore.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <memory>
#include <mutex.hpp>
M module-utils/EventStore/EventStore.hpp => module-utils/EventStore/EventStore.hpp +4 -3
@@ 9,8 9,9 @@
// - gsm SIM tray
// it's not meant to serve as polling interface - rather to serve data
+#include <hal/cellular/SIM.hpp>
+
#include <cstddef>
-#include <service-cellular/api/common.hpp>
#include <string>
namespace cpp_freertos
@@ 119,8 120,8 @@ namespace Store
/// selected - tray selection settings settable sim tray
enum class SIM
{
- SIM1 = static_cast<int>(cellular::api::SimSlot::SIM1),
- SIM2 = static_cast<int>(cellular::api::SimSlot::SIM2),
+ SIM1 = static_cast<int>(hal::cellular::SimSlot::SIM1),
+ SIM2 = static_cast<int>(hal::cellular::SimSlot::SIM2),
SIM_FAIL,
SIM_UNKNOWN,
NONE,
M module-utils/bootconfig/CMakeLists.txt => module-utils/bootconfig/CMakeLists.txt +17 -17
@@ 1,24 1,24 @@
-project( utils-bootconfig VERSION 1.0
- DESCRIPTION "Library for processing boot config"
-)
+add_library(utils-bootconfig STATIC)
-set ( SOURCES
- src/bootconfig.cpp
+target_sources(utils-bootconfig
+ PRIVATE
+ src/bootconfig.cpp
)
-set( INCLUDES
- include
+target_include_directories(utils-bootconfig
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
)
-add_library( ${PROJECT_NAME} STATIC ${SOURCES} )
-
-target_include_directories( ${PROJECT_NAME} PUBLIC ${INCLUDES} )
-
-target_link_libraries( ${PROJECT_NAME}
+target_link_libraries(utils-bootconfig
PRIVATE
- module-utils
- module-vfs
- hash-library::hash-library
- Microsoft.GSL::GSL
- json::json
+ module-os
+ purefs-paths
+ utils-time
+ utility
+ version-header
+
+ Microsoft.GSL::GSL
+ json::json
+ hash-library::hash-library
)
M module-utils/bootconfig/src/bootconfig.cpp => module-utils/bootconfig/src/bootconfig.cpp +2 -5
@@ 6,19 6,17 @@
#include <gsl/util>
#include <limits.h>
#include <purefs/filesystem_paths.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
#include <time/time_conversion.hpp>
#include <ticks.hpp>
#include <cstdio>
-#include <log.hpp>
+#include <log/log.hpp>
#include <array>
#include <Utils.hpp>
#include <fstream>
#include <purefs/filesystem_paths.hpp>
-#include <sys/mount.h>
-#include <sys/statvfs.h>
namespace boot
{
@@ 132,7 130,6 @@ namespace boot
return 0;
}
-
bool BootConfig::loadBootConfig(const std::filesystem::path &bootJsonPath)
{
std::string parseErrors = "";
M module-utils/i18n/CMakeLists.txt => module-utils/i18n/CMakeLists.txt +2 -4
@@ 1,7 1,5 @@
add_library(i18n STATIC)
-module_is_test_entity(i18n)
-
target_sources(i18n
PRIVATE
i18n.cpp
@@ 20,9 18,9 @@ target_include_directories(i18n
target_link_libraries(i18n
PRIVATE
json::json
- log
+ log-api
module-os
- module-vfs
+ purefs-paths
)
if (${ENABLE_TESTS})
M module-utils/i18n/i18n.cpp => module-utils/i18n/i18n.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "i18nImpl.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <cstdio>
#include <purefs/filesystem_paths.hpp>
M module-utils/i18n/tests/CMakeLists.txt => module-utils/i18n/tests/CMakeLists.txt +1 -0
@@ 5,5 5,6 @@ add_catch2_executable(
test_i18n.cpp
LIBS
i18n
+ module-vfs
USE_FS
)
A module-utils/ical/CMakeLists.txt => module-utils/ical/CMakeLists.txt +25 -0
@@ 0,0 1,25 @@
+add_library(utils-calendar STATIC)
+
+target_sources(utils-calendar
+ PUBLIC
+ ParserICS.hpp
+
+ PRIVATE
+ ParserICS.cpp
+)
+
+target_include_directories(utils-calendar
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+)
+
+target_link_libraries(utils-calendar
+ PUBLIC
+ utils-time
+ json::json
+)
+
+if (${ENABLE_TESTS})
+ # calendar tests are out of date
+ # add_subdirectory(tests)
+endif()
A module-utils/ical/tests/CMakeLists.txt => module-utils/ical/tests/CMakeLists.txt +9 -0
@@ 0,0 1,9 @@
+# Phone number tests
+add_catch2_executable(
+ NAME
+ utils-calendar
+ SRCS
+ test_ParserICS.cpp
+ LIBS
+ utils-calendar
+)
R module-utils/test/test_ParserICS.cpp => module-utils/ical/tests/test_ParserICS.cpp +1 -1
@@ 4,7 4,7 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
-#include "ical/ParserICS.hpp"
+#include "ParserICS.hpp"
TEST_CASE("Testing Duration class object", "getDurationString method")
{
A module-utils/locale/CMakeLists.txt => module-utils/locale/CMakeLists.txt +7 -0
@@ 0,0 1,7 @@
+add_library(utils-locale INTERFACE)
+
+target_sources(utils-locale INTERFACE country.hpp)
+target_include_directories(utils-locale
+ INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+)
R module-utils/country.hpp => module-utils/locale/country.hpp +0 -0
M module-utils/log/CMakeLists.txt => module-utils/log/CMakeLists.txt +23 -5
@@ 1,9 1,27 @@
add_library(log STATIC)
+
+add_subdirectory(api)
+add_subdirectory(board)
+
target_sources(log
- PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}/Logger.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/LoggerBuffer.cpp
+ PRIVATE
+ Logger.cpp
+ log.cpp
+ LoggerBuffer.cpp
+ StringCircularBuffer.cpp
)
+
target_include_directories(log PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
-target_link_libraries(log PRIVATE module-bsp)
+
+target_link_libraries(log
+ PRIVATE
+ utility
+
+ PUBLIC
+ module-os
+ log-api
+)
+
+if (${ENABLE_TESTS})
+ add_subdirectory(tests)
+endif()
M module-utils/log/Logger.cpp => module-utils/log/Logger.cpp +1 -2
@@ 3,10 3,9 @@
#include "critical.hpp"
#include <fstream>
-#include <gsl/util>
#include "LockGuard.hpp"
#include <Logger.hpp>
-#include <module-utils/Utils.hpp>
+#include <Utils.hpp>
#include <portmacro.h>
#include <ticks.hpp>
#include "macros.h"
M module-utils/log/Logger.hpp => module-utils/log/Logger.hpp +1 -2
@@ 4,8 4,7 @@
#pragma once
#include <assert.h>
-#include <board.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include "LoggerBuffer.hpp"
#include "log_colors.hpp"
#include <map>
M module-utils/log/LoggerBuffer.hpp => module-utils/log/LoggerBuffer.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include "circular_buffer/StringCircularBuffer.hpp"
+#include "StringCircularBuffer.hpp"
class LoggerBuffer : public StringCircularBuffer
{
R module-utils/circular_buffer/StringCircularBuffer.cpp => module-utils/log/StringCircularBuffer.cpp +0 -0
R module-utils/circular_buffer/StringCircularBuffer.hpp => module-utils/log/StringCircularBuffer.hpp +0 -0
A module-utils/log/api/CMakeLists.txt => module-utils/log/api/CMakeLists.txt +12 -0
@@ 0,0 1,12 @@
+add_library(log-api INTERFACE)
+
+target_sources(log-api
+ INTERFACE
+ log/log.hpp
+ log/debug.hpp
+)
+
+target_include_directories(log-api
+ INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+)
R module-utils/log/debug.hpp => module-utils/log/api/log/debug.hpp +0 -0
R module-utils/log/log.hpp => module-utils/log/api/log/log.hpp +4 -4
@@ 88,10 88,10 @@ extern "C"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
-static const size_t LOGGER_BUFFER_SIZE = 8192;
-static const char *LOG_FILE_NAME = "MuditaOS.log";
-static const int MAX_LOG_FILES_COUNT = 3;
-static const size_t MAX_LOG_FILE_SIZE = 1024 * 1024 * 15; // 15 MB
+static const size_t LOGGER_BUFFER_SIZE = 8192;
+static const char *LOG_FILE_NAME = "MuditaOS.log";
+static const int MAX_LOG_FILES_COUNT = 3;
+static const size_t MAX_LOG_FILE_SIZE = 1024 * 1024 * 15; // 15 MB
#pragma GCC diagnostic pop
#endif /* LOG_LOG_H_ */
R module-utils/board/CMakeLists.txt => module-utils/log/board/CMakeLists.txt +0 -1
@@ 1,2 1,1 @@
add_board_subdirectory()
-target_link_libraries(board PUBLIC module-bsp PRIVATE segger::rtt)
R module-utils/board/linux/CMakeLists.txt => module-utils/log/board/linux/CMakeLists.txt +1 -1
@@ 1,5 1,5 @@
target_sources(
- board
+ log
PRIVATE
log_linux.cpp
)
R module-utils/board/linux/log_linux.cpp => module-utils/log/board/linux/log_linux.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <Logger.hpp>
#include <iostream>
#include <string_view>
R module-utils/board/rt1051/CMakeLists.txt => module-utils/log/board/rt1051/CMakeLists.txt +10 -4
@@ 1,24 1,30 @@
-target_sources(board
+target_sources(log
PRIVATE
log_rt1051.cpp
time_syscalls.cpp
)
+target_link_libraries(log
+ PRIVATE
+ module-bsp
+ segger::rtt
+)
+
if (${LOG_REDIRECT} STREQUAL "RTT_JLINK")
target_sources(
- board
+ log
PRIVATE
log_writeRTT.cpp
)
elseif (${LOG_REDIRECT} STREQUAL "RTT_LUART")
target_sources(
- board
+ log
PRIVATE
log_writeLUART.cpp
)
elseif ((${LOG_REDIRECT} STREQUAL "RTT_SYSTEMVIEW") AND (${SYSTEM_VIEW_ENABLED} EQUAL 1))
target_sources(
- board
+ log
PRIVATE
log_writeSYSTEMVIEW.cpp
)
R module-utils/board/rt1051/log_rt1051.cpp => module-utils/log/board/rt1051/log_rt1051.cpp +1 -1
@@ 4,7 4,7 @@
#include <board.h>
#include <critical.hpp>
#include <macros.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Logger.hpp>
#include <SEGGER_RTT.h>
#include <ticks.hpp>
R module-utils/board/rt1051/log_writeLUART.cpp => module-utils/log/board/rt1051/log_writeLUART.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "fsl_lpuart.h"
#define LOG_UART_DEV LPUART3
R module-utils/board/rt1051/log_writeRTT.cpp => module-utils/log/board/rt1051/log_writeRTT.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "../../segger/rtt/SEGGER_RTT.h"
#define LOG_RTT_BUFF_INDEX 0
R module-utils/board/rt1051/log_writeSYSTEMVIEW.cpp => module-utils/log/board/rt1051/log_writeSYSTEMVIEW.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include "../../segger/systemview/SEGGER/SEGGER_SYSVIEW.h"
void log_WriteToDevice(const uint8_t *pBuffer, unsigned NumBytes)
R module-utils/board/rt1051/time_syscalls.cpp => module-utils/log/board/rt1051/time_syscalls.cpp +0 -0
M module-utils/log/log.cpp => module-utils/log/log.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <Logger.hpp>
#include <ticks.hpp>
#include <macros.h>
R module-utils/test/CMakeLists.txt => module-utils/log/tests/CMakeLists.txt +6 -29
@@ 1,32 1,3 @@
-add_catch2_executable(
- NAME
- utils-conditional-invoke-tests
- SRCS
- test-Utility-ConditionalInvoke.cpp
- LIBS
- module-utils
-)
-
-# Phone number tests
-add_catch2_executable(
- NAME
- utils-phonenumber
- SRCS
- unittest_phonenumber.cpp
- unittest_numbermatcher.cpp
- LIBS
- module-utils
-)
-
-# utils tests
-add_catch2_executable(
- NAME
- utils
- SRCS
- unittest_utils.cpp
- LIBS
- module-utils
-)
# Log tests
add_catch2_executable(
@@ 36,6 7,8 @@ add_catch2_executable(
test_log.cpp
LIBS
module-utils
+ module-vfs
+ USE_FS
)
# Log dumps tests
@@ 46,6 19,7 @@ add_catch2_executable(
test_logDumps.cpp
LIBS
module-utils
+ module-vfs
USE_FS
)
@@ 55,6 29,9 @@ add_catch2_executable(
utils-loggerbuffer
SRCS
test_LoggerBuffer.cpp
+ RandomStringGenerator.cpp
+ RandomStringGenerator.hpp
LIBS
module-utils
+ log
)
R module-utils/generators/RandomStringGenerator.cpp => module-utils/log/tests/RandomStringGenerator.cpp +0 -0
R module-utils/generators/RandomStringGenerator.hpp => module-utils/log/tests/RandomStringGenerator.hpp +0 -0
R module-utils/test/test_LoggerBuffer.cpp => module-utils/log/tests/test_LoggerBuffer.cpp +1 -1
@@ 4,7 4,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
-#include "generators/RandomStringGenerator.hpp"
+#include "RandomStringGenerator.hpp"
#include "LoggerBuffer.hpp"
#include <string>
#include <vector>
R module-utils/test/test_log.cpp => module-utils/log/tests/test_log.cpp +1 -1
@@ 4,7 4,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <string>
using namespace std;
R module-utils/test/test_logDumps.cpp => module-utils/log/tests/test_logDumps.cpp +1 -1
@@ 6,7 6,7 @@
#include <string>
-#include <module-utils/log/Logger.hpp>
+#include <log/Logger.hpp>
namespace
{
M module-utils/math/CMakeLists.txt => module-utils/math/CMakeLists.txt +2 -2
@@ 1,6 1,6 @@
-add_library(math INTERFACE)
+add_library(utils-math INTERFACE)
-target_include_directories(math
+target_include_directories(utils-math
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
M module-utils/math/tests/CMakeLists.txt => module-utils/math/tests/CMakeLists.txt +1 -1
@@ 4,6 4,6 @@ add_catch2_executable(
SRCS
test_math.cpp
LIBS
- math
+ utils-math
module-utils
)
A module-utils/phonenumber/CMakeLists.txt => module-utils/phonenumber/CMakeLists.txt +26 -0
@@ 0,0 1,26 @@
+add_library(utils-phonenumber STATIC)
+
+target_sources(utils-phonenumber
+ PUBLIC
+ NumberHolderMatcher.hpp
+ PhoneNumber.hpp
+
+ PRIVATE
+ PhoneNumber.cpp
+)
+
+target_include_directories(utils-phonenumber
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+)
+
+target_link_libraries(utils-phonenumber
+ PUBLIC
+ utf8
+ utils-locale
+ libphonenumber::libphonenumber
+)
+
+if (${ENABLE_TESTS})
+ add_subdirectory(tests)
+endif()
R module-utils/NumberHolderMatcher.hpp => module-utils/phonenumber/NumberHolderMatcher.hpp +0 -0
R module-utils/PhoneNumber.cpp => module-utils/phonenumber/PhoneNumber.cpp +1 -1
@@ 4,7 4,7 @@
#include "PhoneNumber.hpp"
#include "country.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <phonenumbers/phonenumberutil.h>
#include <phonenumbers/asyoutypeformatter.h>
R module-utils/PhoneNumber.hpp => module-utils/phonenumber/PhoneNumber.hpp +0 -0
A module-utils/phonenumber/tests/CMakeLists.txt => module-utils/phonenumber/tests/CMakeLists.txt +10 -0
@@ 0,0 1,10 @@
+# Phone number tests
+add_catch2_executable(
+ NAME
+ utils-phonenumber
+ SRCS
+ unittest_phonenumber.cpp
+ unittest_numbermatcher.cpp
+ LIBS
+ module-utils
+)
R module-utils/test/unittest_numbermatcher.cpp => module-utils/phonenumber/tests/unittest_numbermatcher.cpp +0 -0
R module-utils/test/unittest_phonenumber.cpp => module-utils/phonenumber/tests/unittest_phonenumber.cpp +0 -0
M module-utils/rrule/CMakeLists.txt => module-utils/rrule/CMakeLists.txt +3 -3
@@ 13,13 13,13 @@ target_include_directories(rrule PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE
target_link_libraries(rrule
PUBLIC
date
- time
+ utils-time
+ utility
+
PRIVATE
ical_cxx
)
-module_is_test_entity(rrule)
-
if (${ENABLE_TESTS})
add_subdirectory(test)
endif()
M module-utils/time/CMakeLists.txt => module-utils/time/CMakeLists.txt +16 -14
@@ 2,36 2,38 @@ add_library(time-constants INTERFACE)
target_include_directories(time-constants INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
-target_sources(time-constants
+target_sources(time-constants
PUBLIC
time/time_constants.hpp
)
-add_library(time)
+add_library(utils-time)
-module_is_test_entity(time)
-
-target_sources(time
+target_sources(utils-time
PRIVATE
time/time_conversion.cpp
time/time_date_validation.cpp
- time/TimeRangeParser.cpp
- time/TimeZone.cpp
time/time_conversion_factory.cpp
-
time/dateCommon.hpp
+ time/TimeRangeParser.cpp
+ time/TimeZone.cpp
)
-target_include_directories(time PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+target_include_directories(utils-time
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
-target_link_libraries(time
- PRIVATE
- time-constants
+target_link_libraries(utils-time
+ PRIVATE
utz::utz
+
PUBLIC
+ time-constants
+ date
i18n
- log
- module-utils
+ log-api
+ utility
utf8
)
M module-utils/time/test/CMakeLists.txt => module-utils/time/test/CMakeLists.txt +4 -4
@@ 4,8 4,7 @@ add_catch2_executable(
SRCS
unittest_TimeRangeParser.cpp
LIBS
- module-utils
- time
+ utils-time
)
add_catch2_executable(
@@ 14,7 13,7 @@ add_catch2_executable(
SRCS
unittest_TimeZone.cpp
LIBS
- time
+ utils-time
)
# time tests
add_catch2_executable(
@@ 23,7 22,8 @@ add_catch2_executable(
SRCS
unittest_time.cpp
LIBS
- time
+ utils-time
utf8
+ module-vfs
USE_FS
)
M module-utils/time/time/ScopedTime.hpp => module-utils/time/time/ScopedTime.hpp +1 -1
@@ 4,7 4,7 @@
#pragma once
#include <FreeRTOS.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <string>
#include <ticks.hpp>
M module-utils/time/time/dateCommon.hpp => module-utils/time/time/dateCommon.hpp +3 -15
@@ 4,9 4,9 @@
#ifndef DATECOMMON_H
#define DATECOMMON_H
-#include <time/time_conversion_factory.hpp>
-#include <module-utils/Utils.hpp>
-#include <service-time/api/TimeSettingsApi.hpp>
+#include "time_conversion_factory.hpp"
+
+#include <Utils.hpp>
#include <date/date.h>
@@ 276,12 276,6 @@ inline std::string TimePointToLocalizedTimeString(const TimePoint &tp, const std
return timestamp->str(format);
}
-inline std::string TimePointToLocalizedHourMinString(const TimePoint &tp)
-{
- return stm::api::isTimeFormat12h() ? TimePointToLocalizedTimeString(tp, "%I:%M")
- : TimePointToLocalizedTimeString(tp, "%H:%M");
-}
-
inline TimePoint TimePointFromString(const char *s1)
{
TimePoint tp;
@@ 326,12 320,6 @@ inline std::string TimePointToHourString12H(const TimePoint &tp)
return utils::to_string(hour12h);
}
-inline std::string TimePointToLocalizedHourString(const TimePoint &tp)
-{
- return stm::api::isTimeFormat12h() ? TimePointToLocalizedTimeString(tp, "%I")
- : TimePointToLocalizedTimeString(tp, "%H");
-}
-
inline std::string TimePointToHourString24H(const TimePoint &tp)
{
auto hour =
M module-utils/time/time/time_conversion.hpp => module-utils/time/time/time_conversion.hpp +1 -1
@@ 7,7 7,7 @@
/// as stdlib builtin locale doesn't provide way to substitute C-LOCALE
#include "time/time_locale.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <vector>
#include <string>
M module-utils/time/time/time_date_validation.cpp => module-utils/time/time/time_date_validation.cpp +1 -1
@@ 8,7 8,7 @@
* Author: kuba
*/
#include "time_date_validation.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace utils
{
namespace time
M module-utils/time/time/time_locale.hpp => module-utils/time/time/time_locale.hpp +1 -1
@@ 6,7 6,7 @@
#include <array>
#include <utf8/UTF8.hpp>
#include "i18n/i18n.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
namespace utils
{
A module-utils/unicode/CMakeLists.txt => module-utils/unicode/CMakeLists.txt +10 -0
@@ 0,0 1,10 @@
+add_library(utils-unicode INTERFACE)
+
+add_subdirectory(ucs2)
+add_subdirectory(utf8)
+
+target_link_libraries(utils-unicode
+ INTERFACE
+ ucs2
+ utf8
+)
R module-utils/ucs2/CMakeLists.txt => module-utils/unicode/ucs2/CMakeLists.txt +1 -3
@@ 1,7 1,5 @@
add_library(ucs2 STATIC)
-module_is_test_entity(ucs2)
-
target_sources(ucs2
PRIVATE
ucs2/UCS2.cpp
@@ 17,7 15,7 @@ target_link_libraries(ucs2
utf8
PRIVATE
- log
+ log-api
)
if (${ENABLE_TESTS})
R module-utils/ucs2/test/CMakeLists.txt => module-utils/unicode/ucs2/test/CMakeLists.txt +0 -0
R module-utils/ucs2/test/unittest_ucs2.cpp => module-utils/unicode/ucs2/test/unittest_ucs2.cpp +0 -0
R module-utils/ucs2/ucs2/UCS2.cpp => module-utils/unicode/ucs2/ucs2/UCS2.cpp +1 -1
@@ 7,7 7,7 @@
#include <sstream>
#include <iomanip>
-#include <log.hpp>
+#include <log/log.hpp>
#include <iterator>
#include <locale>
#include <codecvt>
R module-utils/ucs2/ucs2/UCS2.hpp => module-utils/unicode/ucs2/ucs2/UCS2.hpp +0 -0
R module-utils/utf8/CMakeLists.txt => module-utils/unicode/utf8/CMakeLists.txt +1 -3
@@ 1,7 1,5 @@
add_library(utf8 STATIC)
-module_is_test_entity(utf8)
-
target_sources(utf8
PRIVATE
utf8/UTF8.cpp
@@ 12,7 10,7 @@ target_include_directories(utf8
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
-target_link_libraries(utf8 PRIVATE log)
+target_link_libraries(utf8 PRIVATE log-api)
if (${ENABLE_TESTS})
add_subdirectory(test)
R module-utils/utf8/test/CMakeLists.txt => module-utils/unicode/utf8/test/CMakeLists.txt +1 -1
@@ 4,6 4,6 @@ add_catch2_executable(
SRCS
unittest_utf8.cpp
LIBS
- log
+ log-api
utf8
)
R module-utils/utf8/test/unittest_utf8.cpp => module-utils/unicode/utf8/test/unittest_utf8.cpp +0 -0
R module-utils/utf8/utf8/UTF8.cpp => module-utils/unicode/utf8/utf8/UTF8.cpp +1 -1
@@ 6,7 6,7 @@
#include <cstdint>
#include <ostream>
-#include <log.hpp>
+#include <log/log.hpp>
#include "utf8/UTF8.hpp"
#define debug_utf(...)
R module-utils/utf8/utf8/UTF8.hpp => module-utils/unicode/utf8/utf8/UTF8.hpp +0 -0
A module-utils/utility/CMakeLists.txt => module-utils/utility/CMakeLists.txt +33 -0
@@ 0,0 1,33 @@
+add_library(utility STATIC)
+
+target_sources(utility
+ PRIVATE
+ Utils.cpp
+
+ PUBLIC
+ integer.hpp
+ Split.hpp
+ split_sv.hpp
+ Temperature.hpp
+ Utility.hpp
+ Utils.hpp
+)
+
+target_include_directories(utility
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+)
+
+target_link_libraries(utility
+ PUBLIC
+ log-api
+ magic_enum::magic_enum
+
+ PRIVATE
+ hash-library::hash-library
+)
+
+if (${ENABLE_TESTS})
+ add_subdirectory(tests)
+endif()
+
R module-utils/Split.hpp => module-utils/utility/Split.hpp +0 -0
R module-utils/Temperature.hpp => module-utils/utility/Temperature.hpp +0 -0
R module-utils/Utils.cpp => module-utils/utility/Utils.cpp +0 -0
R module-utils/Utils.hpp => module-utils/utility/Utils.hpp +9 -9
@@ 3,7 3,7 @@
#pragma once
#include "Split.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <magic_enum.hpp>
#include <algorithm> // std::find_if_not
@@ 72,12 72,12 @@ namespace utils
return base;
}
- template <typename T>[[nodiscard]] std::string to_string(T t)
+ template <typename T> [[nodiscard]] std::string to_string(T t)
{
return std::to_string(t);
}
- template <>[[nodiscard]] inline std::string to_string<long double>(long double t)
+ template <> [[nodiscard]] inline std::string to_string<long double>(long double t)
{
uint32_t precision = 6;
int base = static_cast<int>(t);
@@ 113,31 113,31 @@ namespace utils
return baseAsStr + "." + fractionalAsStr;
}
- template <>[[nodiscard]] inline std::string to_string<float>(float t)
+ template <> [[nodiscard]] inline std::string to_string<float>(float t)
{
return to_string(static_cast<long double>(t));
}
- template <>[[nodiscard]] inline std::string to_string<double>(double t)
+ template <> [[nodiscard]] inline std::string to_string<double>(double t)
{
return to_string(static_cast<long double>(t));
}
- template <>[[nodiscard]] inline std::string to_string<std::int64_t>(std::int64_t value)
+ template <> [[nodiscard]] inline std::string to_string<std::int64_t>(std::int64_t value)
{
std::ostringstream ss;
ss << value;
return ss.str();
}
- template <>[[nodiscard]] inline std::string to_string<std::uint64_t>(std::uint64_t value)
+ template <> [[nodiscard]] inline std::string to_string<std::uint64_t>(std::uint64_t value)
{
std::ostringstream ss;
ss << value;
return ss.str();
}
- template <typename T>[[nodiscard]] const std::string enumToString(const T &t)
+ template <typename T> [[nodiscard]] const std::string enumToString(const T &t)
{
static_assert(std::is_enum_v<T>);
return std::string(magic_enum::enum_name(t));
@@ 147,7 147,7 @@ namespace utils
///
/// @param value to be converted
/// @return Value casted to type T
- template <typename T>[[nodiscard]] T getNumericValue(const std::string &value)
+ template <typename T> [[nodiscard]] T getNumericValue(const std::string &value)
{
static_assert(std::is_arithmetic_v<T>);
if (value.empty()) {
R module-utils/integer.hpp => module-utils/utility/integer.hpp +0 -0
R module-utils/split_sv.hpp => module-utils/utility/split_sv.hpp +0 -0
A module-utils/utility/tests/CMakeLists.txt => module-utils/utility/tests/CMakeLists.txt +18 -0
@@ 0,0 1,18 @@
+add_catch2_executable(
+ NAME
+ utils-conditional-invoke-tests
+ SRCS
+ test-Utility-ConditionalInvoke.cpp
+ LIBS
+ module-utils
+)
+
+add_catch2_executable(
+ NAME
+ utils
+ SRCS
+ unittest_utils.cpp
+ LIBS
+ module-utils
+)
+
R module-utils/test/test-Utility-ConditionalInvoke.cpp => module-utils/utility/tests/test-Utility-ConditionalInvoke.cpp +1 -1
@@ 4,7 4,7 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
-#include <module-utils/utility/Utility.hpp>
+#include <Utility.hpp>
struct SomeStruct
{
R module-utils/test/unittest_utils.cpp => module-utils/utility/tests/unittest_utils.cpp +0 -0
M module-vfs/drivers/src/purefs/fs/filesystem_littlefs.cpp => module-vfs/drivers/src/purefs/fs/filesystem_littlefs.cpp +10 -10
@@ 10,7 10,7 @@
#include <purefs/blkdev/disk_handle.hpp>
#include <purefs/fs/mount_flags.hpp>
#include <lfs.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <climits>
#include <syslimits.h>
@@ 133,11 133,11 @@ namespace
LOG_ERROR("Block size doesn't match partition size");
return -ERANGE;
}
- cfg->block_count = total_siz / cfg->block_size - 1;
+ cfg->block_count = total_siz / cfg->block_size - 1;
cfg->lookahead_size = std::min<lfs_size_t>(131072U, ((cfg->block_count >> 3U) + 1U) << 3U);
- cfg->read_size = cfg->block_size;
- cfg->prog_size = cfg->block_size;
- cfg->cache_size = cfg->block_size;
+ cfg->read_size = cfg->block_size;
+ cfg->prog_size = cfg->block_size;
+ cfg->cache_size = cfg->block_size;
LOG_INFO("LFS: block count %u block size %u", unsigned(cfg->block_count), unsigned(cfg->block_size));
return 0;
}
@@ 149,7 149,7 @@ namespace purefs::fs::drivers
namespace
{
template <typename T, typename... Args>
- auto invoke_lfs(filesystem_littlefs::fsfile zfil, T lfs_fun, Args &&... args)
+ auto invoke_lfs(filesystem_littlefs::fsfile zfil, T lfs_fun, Args &&...args)
-> decltype(lfs_fun(nullptr, nullptr, std::forward<Args>(args)...))
{
auto vfile = std::dynamic_pointer_cast<file_handle_littlefs>(zfil);
@@ 166,7 166,7 @@ namespace purefs::fs::drivers
return lfs_to_errno(lerr);
}
template <typename T, typename... Args>
- auto invoke_lfs(filesystem_littlefs::fsdir zdir, T lfs_fun, Args &&... args)
+ auto invoke_lfs(filesystem_littlefs::fsdir zdir, T lfs_fun, Args &&...args)
-> decltype(lfs_fun(nullptr, nullptr, std::forward<Args>(args)...))
{
auto vdir = std::dynamic_pointer_cast<directory_handle_littlefs>(zdir);
@@ 184,7 184,7 @@ namespace purefs::fs::drivers
}
template <typename T, typename... Args>
- auto invoke_lfs(filesystem_littlefs::fsmount fmnt, T lfs_fun, Args &&... args)
+ auto invoke_lfs(filesystem_littlefs::fsmount fmnt, T lfs_fun, Args &&...args)
-> decltype(lfs_fun(nullptr, std::forward<Args>(args)...))
{
auto mntp = std::static_pointer_cast<mount_point_littlefs>(fmnt);
@@ 197,7 197,7 @@ namespace purefs::fs::drivers
}
template <typename T, typename... Args>
- auto invoke_lfs(filesystem_littlefs::fsmount fmnt, std::string_view path, T lfs_fun, Args &&... args)
+ auto invoke_lfs(filesystem_littlefs::fsmount fmnt, std::string_view path, T lfs_fun, Args &&...args)
-> decltype(lfs_fun(nullptr, "", std::forward<Args>(args)...))
{
auto mntp = std::static_pointer_cast<mount_point_littlefs>(fmnt);
@@ 234,7 234,7 @@ namespace purefs::fs::drivers
return lfs_to_errno(err);
}
{
- auto diskmm = disk_mngr();
+ auto diskmm = disk_mngr();
const auto ssize = diskmm->get_info(disk, blkdev::info_type::sector_size);
if (ssize < 0) {
LOG_ERROR("Unable to read sector size %i", int(ssize));
M module-vfs/drivers/src/purefs/fs/filesystem_vfat.cpp => module-vfs/drivers/src/purefs/fs/filesystem_vfat.cpp +1 -1
@@ 8,7 8,7 @@
#include <purefs/fs/drivers/file_handle_vfat.hpp>
#include <purefs/fs/drivers/directory_handle_vfat.hpp>
#include <purefs/fs/mount_flags.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <fatfs/volume_mapper.hpp>
#include <ff.h>
#include <sys/statvfs.h>
M module-vfs/drivers/src/thirdparty/littlefs/lfs_glue.cpp => module-vfs/drivers/src/thirdparty/littlefs/lfs_glue.cpp +1 -1
@@ 4,7 4,7 @@
#include <lfs.h>
#include <purefs/blkdev/disk_handle.hpp>
#include <purefs/blkdev/disk_manager.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <mutex.hpp>
#include <errno.h>
M module-vfs/src/purefs/blkdev/disk_handle.cpp => module-vfs/src/purefs/blkdev/disk_handle.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <purefs/blkdev/disk_handle.hpp>
#include <purefs/blkdev/disk.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
namespace purefs::blkdev::internal
{
M module-vfs/src/purefs/blkdev/disk_manager.cpp => module-vfs/src/purefs/blkdev/disk_manager.cpp +2 -2
@@ 3,7 3,7 @@
#include <purefs/blkdev/disk_manager.hpp>
#include <purefs/blkdev/disk.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <mutex.hpp>
#include <errno.h>
#include <charconv>
@@ 18,7 18,7 @@ namespace purefs::blkdev
namespace
{
using namespace std::literals;
- static constexpr auto part_suffix = "part"sv;
+ static constexpr auto part_suffix = "part"sv;
static constexpr auto syspart_suffix = "sys"sv;
} // namespace
M module-vfs/src/purefs/blkdev/partition_parser.cpp => module-vfs/src/purefs/blkdev/partition_parser.cpp +1 -1
@@ 3,7 3,7 @@
#include <purefs/blkdev/partition_parser.hpp>
#include <purefs/blkdev/disk.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <errno.h>
#include <limits>
M module-vfs/src/purefs/fs/filesystem_syscalls.cpp => module-vfs/src/purefs/fs/filesystem_syscalls.cpp +1 -1
@@ 2,7 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <purefs/fs/filesystem.hpp>
#include <errno.h>
-#include <log.hpp>
+#include <log/log.hpp>
#include <purefs/fs/filesystem_operations.hpp>
#include <purefs/fs/file_handle.hpp>
#include <purefs/fs/directory_handle.hpp>
M module-vfs/src/purefs/vfs_subsystem.cpp => module-vfs/src/purefs/vfs_subsystem.cpp +1 -1
@@ 8,7 8,7 @@
#include <purefs/vfs_subsystem.hpp>
#include <purefs/vfs_subsystem_internal.hpp>
#include <purefs/fs/thread_local_cwd.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <purefs/filesystem_paths.hpp>
#include <json11.hpp>
#include <sys/stat.h>
M products/BellHybrid/BellHybridMain.cpp => products/BellHybrid/BellHybridMain.cpp +2 -2
@@ 29,9 29,9 @@
#include <Application.hpp>
#include <ApplicationLauncher.hpp>
-#include <log/Logger.hpp>
+#include <Logger.hpp>
#include <log/log.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
#include <sys/SystemManager.hpp>
#include <time/AlarmOperations.hpp>
#include <SystemWatchdog/SystemWatchdog.hpp>
M products/BellHybrid/CMakeLists.txt => products/BellHybrid/CMakeLists.txt +2 -2
@@ 47,6 47,7 @@ target_link_libraries(BellHybrid
bell::app-settings
bell::db
evtmgr
+ log
messagetype
module-bsp
module-vfs
@@ 56,6 57,7 @@ target_link_libraries(BellHybrid
sys
bell::time
platform
+ version-header
"$<$<STREQUAL:${PROJECT_TARGET},TARGET_Linux>:iosyscalls>"
"$<$<STREQUAL:${PROJECT_TARGET},TARGET_RT1051>:CrashCatcher::CrashCatcher>"
)
@@ 68,8 70,6 @@ set_source_files_properties(BellHybridMain.cpp PROPERTIES COMPILE_DEFINITIONS "$
strip_executable(BellHybrid)
-add_dependencies(BellHybrid version)
-
include(AddBootBin)
add_boot_bin(BellHybrid)
add_image(
M products/BellHybrid/apps/application-bell-main/CMakeLists.txt => products/BellHybrid/apps/application-bell-main/CMakeLists.txt +1 -1
@@ 40,7 40,7 @@ target_link_libraries(application-bell-main
i18n
module-gui
service-gui
- time
+ utils-time
bell::db
bell::evtmgr
bell::app-alarm
M products/BellHybrid/apps/application-bell-main/models/TemperatureModel.hpp => products/BellHybrid/apps/application-bell-main/models/TemperatureModel.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/Temperature.hpp>
+#include <Temperature.hpp>
#include <service-db/Settings.hpp>
#include <cstdint>
M products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.hpp => products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.hpp +1 -1
@@ 9,7 9,7 @@
#include <common/models/AbstractAlarmModel.hpp>
#include <gui/input/InputEvent.hpp>
#include <Timers/TimerHandle.hpp>
-#include <module-utils/Temperature.hpp>
+#include <Temperature.hpp>
#include <time/time_locale.hpp>
#include <utf8/UTF8.hpp>
M products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/TemperatureUnitModel.hpp => products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/TemperatureUnitModel.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/Temperature.hpp>
+#include <Temperature.hpp>
#include <service-db/Settings.hpp>
#include <memory>
M products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/TimeUnitsModel.hpp => products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/models/TimeUnitsModel.hpp +1 -1
@@ 5,7 5,7 @@
#include <apps-common/ApplicationCommon.hpp>
#include <apps-common/InternalModel.hpp>
-#include <module-utils/Temperature.hpp>
+#include <Temperature.hpp>
#include <time/time_locale.hpp>
namespace gui
M products/BellHybrid/apps/application-bell-settings/widgets/TemperatureUnitListItem.hpp => products/BellHybrid/apps/application-bell-settings/widgets/TemperatureUnitListItem.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/Temperature.hpp>
+#include <Temperature.hpp>
#include <widgets/BellSideListItem.hpp>
#include <widgets/spinners/Spinners.hpp>
#include <utf8/UTF8.hpp>
M products/BellHybrid/apps/common/include/common/TimeUtils.hpp => products/BellHybrid/apps/common/include/common/TimeUtils.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-utils/utf8/utf8/UTF8.hpp>
+#include <utf8/UTF8.hpp>
#include <ctime>
M products/BellHybrid/services/evtmgr/EventManager.cpp => products/BellHybrid/services/evtmgr/EventManager.cpp +1 -1
@@ 6,7 6,7 @@
#include "WorkerEvent.hpp"
#include <evtmgr/EventManager.hpp>
#include <keymap/KeyMap.hpp>
-#include <module-bsp/hal/temperature_source/TemperatureSource.hpp>
+#include <hal/temperature_source/TemperatureSource.hpp>
#include <SystemManager/Constants.hpp>
#include <screen-light-control/ScreenLightControl.hpp>
#include <service-evtmgr/KbdMessage.hpp>
M products/BellHybrid/services/evtmgr/include/evtmgr/api/TemperatureApi.hpp => products/BellHybrid/services/evtmgr/include/evtmgr/api/TemperatureApi.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-bsp/hal/temperature_source/TemperatureSource.hpp>
+#include <hal/temperature_source/TemperatureSource.hpp>
namespace evtmgr::api
{
M products/BellHybrid/services/evtmgr/internal/StaticData.hpp => products/BellHybrid/services/evtmgr/internal/StaticData.hpp +1 -1
@@ 3,7 3,7 @@
#pragma once
-#include <module-bsp/hal/temperature_source/TemperatureSource.hpp>
+#include <hal/temperature_source/TemperatureSource.hpp>
namespace evtmgr::internal
{
M products/PurePhone/CMakeLists.txt => products/PurePhone/CMakeLists.txt +2 -2
@@ 60,6 60,7 @@ target_link_libraries(PurePhone
appmgr
db
evtmgr
+ log
messagetype
module-apps
module-bsp
@@ 71,6 72,7 @@ target_link_libraries(PurePhone
service-fileindexer
service-time
sys
+ version-header
"$<$<STREQUAL:${PROJECT_TARGET},TARGET_Linux>:iosyscalls>"
"$<$<STREQUAL:${PROJECT_TARGET},TARGET_RT1051>:CrashCatcher::CrashCatcher>"
)
@@ 85,8 87,6 @@ strip_executable(PurePhone)
message_serial_status()
-add_dependencies(PurePhone version)
-
include(AddBootBin)
add_boot_bin(PurePhone)
add_image(
M products/PurePhone/PurePhoneMain.cpp => products/PurePhone/PurePhoneMain.cpp +2 -2
@@ 59,9 59,9 @@
#include <Application.hpp>
#include <ApplicationLauncher.hpp>
-#include <log.hpp>
+#include <log/log.hpp>
#include <Logger.hpp>
-#include <source/version.hpp>
+#include <product/version.hpp>
#include <sys/SystemManager.hpp>
#include <SystemWatchdog/SystemWatchdog.hpp>
#include <thread.hpp>
M products/PurePhone/sys/SystemManager.cpp => products/PurePhone/sys/SystemManager.cpp +1 -1
@@ 9,7 9,7 @@
#include <SystemManager/messages/SystemManagerMessage.hpp>
#include <SystemManager/messages/TetheringQuestionRequest.hpp>
#include <SystemManager/messages/TetheringStateRequest.hpp>
-#include <module-utils/EventStore/EventStore.hpp>
+#include <EventStore.hpp>
#include <service-appmgr/Constants.hpp>
#include <service-cellular/CellularMessage.hpp>
#include <service-cellular/CellularServiceAPI.hpp>
M products/PurePhone/test/test-settings/Database.cpp => products/PurePhone/test/test-settings/Database.cpp +1 -1
@@ 3,7 3,7 @@
#include "module-db/Database/Database.hpp"
-#include <log.hpp>
+#include <log/log.hpp>
#include <purefs/filesystem_paths.hpp>
#include <gsl/util>
M test/CMakeLists.txt => test/CMakeLists.txt +2 -2
@@ 82,7 82,7 @@ function(add_gtest_executable)
enable_test_filesystem()
endif()
- target_link_libraries(${_TESTNAME} PRIVATE gtest_main gmock log)
+ target_link_libraries(${_TESTNAME} PRIVATE gtest_main gmock log-api)
foreach(lib ${_TEST_ARGS_LIBS})
target_link_libraries(${_TESTNAME} PRIVATE ${lib})
endforeach(lib)
@@ 157,7 157,7 @@ function(add_catch2_executable)
enable_test_filesystem()
endif()
- target_link_libraries(${_TESTNAME} PRIVATE Catch2::Catch2 log)
+ target_link_libraries(${_TESTNAME} PRIVATE Catch2::Catch2 log-api)
foreach(lib ${_TEST_ARGS_LIBS})
target_link_libraries(${_TESTNAME} PRIVATE ${lib})
endforeach(lib)
M test/mock-logs.cpp => test/mock-logs.cpp +1 -1
@@ 1,7 1,7 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#include <log.hpp>
+#include <log/log.hpp>
#include <cstdarg>
__attribute__((weak)) int log_Log(
logger_level level, const char *file, int line, const char *function, const char *fmt, ...)
M third-party/libphonenumber/CMakeLists.txt => third-party/libphonenumber/CMakeLists.txt +2 -1
@@ 45,6 45,7 @@ set_source_files_properties (${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/src/phonenumber
target_link_libraries (libphonenumber
PRIVATE
re2::re2
- PUBLIC
+ PUBLIC
+ module-os
protobuf::libprotobuf-lite
)