Skip to content

Commit

Permalink
update stm32 modules for gcc12
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Oct 16, 2024
1 parent a24c07d commit 2c4e3b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stm32-modules/include/common/core/ack_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#include <cstdint>

#include <algorithm>
#include <array>
#include <variant>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <array>
#include <concepts>
#include <cstdint>
#include <optional>
#include <variant>

#include "heater-shaker/errors.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <array>
#include <concepts>
#include <cstdint>
#include <optional>
#include <variant>

#include "systemwide.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,13 @@ class TMC2130 {
template <TMC2130Register Reg, TMC2130Policy Policy>
requires WritableRegister<Reg>
auto set_register(Policy& policy, Reg reg) -> bool {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
// Ignore the typical linter warning because we're only using
// this on __packed structures that mimic hardware registers
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
auto value = *reinterpret_cast<RegisterSerializedTypeA*>(&reg);
#pragma GCC diagnostic pop
value &= Reg::value_mask;
return _spi.write(Reg::address, value, policy);
}
Expand Down

0 comments on commit 2c4e3b3

Please sign in to comment.