diff --git a/meson.build b/meson.build index 3d861139..b52ae16f 100644 --- a/meson.build +++ b/meson.build @@ -277,7 +277,6 @@ linux_platform_src = ['platform/targets/linux/emulator/emulator.c', 'platform/drivers/GPS/GPS_linux.c', 'platform/mcu/x86_64/drivers/gpio.c', 'platform/mcu/x86_64/drivers/delays.c', - 'platform/mcu/x86_64/drivers/rtc.c', 'platform/drivers/baseband/radio_linux.cpp', 'platform/drivers/audio/audio_linux.c', 'platform/drivers/audio/inputStream_linux.cpp', diff --git a/openrtx/include/core/state.h b/openrtx/include/core/state.h index b5f237e1..404c3b2c 100644 --- a/openrtx/include/core/state.h +++ b/openrtx/include/core/state.h @@ -21,7 +21,6 @@ #ifndef STATE_H #define STATE_H -#include #include #include #include diff --git a/openrtx/include/interfaces/rtc.h b/openrtx/include/peripherals/rtc.h similarity index 100% rename from openrtx/include/interfaces/rtc.h rename to openrtx/include/peripherals/rtc.h diff --git a/platform/mcu/STM32F4xx/drivers/rtc.c b/platform/mcu/STM32F4xx/drivers/rtc.c index 6c3d857f..c5c844b8 100644 --- a/platform/mcu/STM32F4xx/drivers/rtc.c +++ b/platform/mcu/STM32F4xx/drivers/rtc.c @@ -17,7 +17,7 @@ * along with this program; if not, see * ***************************************************************************/ -#include +#include #include void rtc_init() diff --git a/platform/mcu/x86_64/drivers/rtc.c b/platform/mcu/x86_64/drivers/rtc.c deleted file mode 100644 index 743f0229..00000000 --- a/platform/mcu/x86_64/drivers/rtc.c +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2020 - 2023 by Federico Amedeo Izzo IU2NUO, * - * Niccolò Izzo IU2KIN, * - * Silvano Seva IU2KWO * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, see * - ***************************************************************************/ - -#include -#include -#include - -void rtc_init() -{ - printf("rtc_init()\n"); -} - -void rtc_terminate() -{ - printf("rtc_shutdown()\n"); -} - -void rtc_setTime(datetime_t t) -{ - (void) t; - - printf("rtc_setTime(t)\n"); -} - -void rtc_setHour(uint8_t hours, uint8_t minutes, uint8_t seconds) -{ - printf("rtc_setHour(%d, %d, %d)\n", hours, minutes, seconds); -} - -void rtc_setDate(uint8_t date, uint8_t month, uint8_t year) -{ - printf("rtc_setDate(%d, %d, %d)\n", date, month, year); -} - -datetime_t rtc_getTime() -{ - datetime_t t; - - time_t rawtime; - struct tm * timeinfo; - time ( &rawtime ); - timeinfo = gmtime ( &rawtime ); - //radio expects time to be TZ-less, so use gmtime instead of localtime. - - t.hour = timeinfo->tm_hour; - t.minute = timeinfo->tm_min; - t.second = timeinfo->tm_sec; - t.day = timeinfo->tm_wday; - t.date = timeinfo->tm_mday; - t.month = timeinfo->tm_mon + 1; - // Only last two digits of the year are supported in OpenRTX - t.year = (timeinfo->tm_year + 1900) % 100; - - return t; -} - -void rtc_dstSet() -{ - printf("rtc_dstSet()\n"); -} - -void rtc_dstClear() -{ - printf("rtc_dstClear()\n"); -} diff --git a/platform/targets/MD-3x0/platform.c b/platform/targets/MD-3x0/platform.c index c76160d2..9e0362e2 100644 --- a/platform/targets/MD-3x0/platform.c +++ b/platform/targets/MD-3x0/platform.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include static hwInfo_t hwInfo; diff --git a/platform/targets/MD-9600/platform.c b/platform/targets/MD-9600/platform.c index 946091f1..818946b1 100644 --- a/platform/targets/MD-9600/platform.c +++ b/platform/targets/MD-9600/platform.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/platform/targets/MD-UV3x0/platform.c b/platform/targets/MD-UV3x0/platform.c index 472bb09c..72f3753c 100644 --- a/platform/targets/MD-UV3x0/platform.c +++ b/platform/targets/MD-UV3x0/platform.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include