Skip to content

Commit

Permalink
Tools: add and use HAP_PERIPH_ENABLE_RTC
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Oct 11, 2023
1 parent cf96791 commit 5663718
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/AP_Periph/AP_Periph.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Tools/AP_Periph/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
1 change: 1 addition & 0 deletions Tools/AP_Periph/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5663718

Please sign in to comment.