From 566371837ccfbb2c1c79d5b11235b866302b4513 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 8 Oct 2023 14:46:27 +1100 Subject: [PATCH] Tools: add and use HAP_PERIPH_ENABLE_RTC --- Tools/AP_Periph/AP_Periph.h | 4 ++++ Tools/AP_Periph/Parameters.cpp | 6 ++++++ Tools/AP_Periph/Parameters.h | 1 + 3 files changed, 11 insertions(+) diff --git a/Tools/AP_Periph/AP_Periph.h b/Tools/AP_Periph/AP_Periph.h index d47c8617debb5b..2723d589e0aa17 100644 --- a/Tools/AP_Periph/AP_Periph.h +++ b/Tools/AP_Periph/AP_Periph.h @@ -359,6 +359,10 @@ class AP_Periph_FW { AP_Networking networking; #endif +#ifdef HAL_PERIPH_ENABLE_RTC + AP_RTC rtc; +#endif + #if HAL_GCS_ENABLED GCS_Periph _gcs; #endif diff --git a/Tools/AP_Periph/Parameters.cpp b/Tools/AP_Periph/Parameters.cpp index 85c57798313ead..80b3ae7d44a219 100644 --- a/Tools/AP_Periph/Parameters.cpp +++ b/Tools/AP_Periph/Parameters.cpp @@ -608,6 +608,12 @@ const AP_Param::Info AP_Periph_FW::var_info[] = { GSCALAR(can_mirror_ports, "CAN_MIRROR_PORTS", 0), #endif // HAL_PERIPH_CAN_MIRROR +#ifdef HAL_PERIPH_ENABLE_RTC + // @Group: RTC + // @Path: ../libraries/AP_RTC/AP_RTC.cpp + GOBJECT(rtc, "RTC", AP_RTC), +#endif + AP_VAREND }; diff --git a/Tools/AP_Periph/Parameters.h b/Tools/AP_Periph/Parameters.h index 030444030ae80e..fb4a628b021099 100644 --- a/Tools/AP_Periph/Parameters.h +++ b/Tools/AP_Periph/Parameters.h @@ -84,6 +84,7 @@ class Parameters { k_param_battery_balance, k_param_battery_hide_mask, k_param_can_mirror_ports, + k_param_rtc, }; AP_Int16 format_version;