Skip to content

Commit f87562c

Browse files
committed
Remove deprecated code
1 parent 3a438ae commit f87562c

File tree

12 files changed

+9
-208
lines changed

12 files changed

+9
-208
lines changed

repo.lb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,6 @@ def init(repo):
238238
config = {v.strip(): (module.parent / "board.xml") for v in versions}
239239
repo.add_configuration(Configuration(name, description, config, versions[0].strip()))
240240

241-
# DEPRECATE: 2022q1
242-
repo.add_alias(Alias(name="blue-pill", destination=":blue-pill-f103",
243-
description="Renamed for clarity."))
244-
repo.add_alias(Alias(name="black-pill", destination=":black-pill-f103",
245-
description="Renamed for clarity."))
246-
repo.add_alias(Alias(name="mini-f401", destination=":black-pill-f401",
247-
description="Renamed for clarity."))
248-
repo.add_alias(Alias(name="mini-f411", destination=":black-pill-f411",
249-
description="Renamed for clarity."))
250-
251241
# Add Jinja2 filters commonly used in this repository
252242
if 'Windows' in platform.platform():
253243
def windowsify(path, escape_level):

src/modm/architecture/interface/delay.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,6 @@ template<class Rep, class Period>
9696
inline void delay(std::chrono::duration<Rep, Period> time)
9797
{ delay(std::chrono::duration_cast<std::chrono::milliseconds>(time)); }
9898

99-
// The old methods are deprecated
100-
// DEPRECATE: 2022q1
101-
[[deprecated("Use `modm::delay_ns(uint32_t ns)` instead!")]]
102-
inline void delayNanoseconds(uint32_t ns) { delay_ns(ns); }
103-
104-
[[deprecated("Use `modm::delay_us(uint32_t us)` instead!")]]
105-
inline void delayMicroseconds(uint32_t us) { delay_us(us); }
106-
107-
[[deprecated("Use `modm::delay_ms(uint32_t ms)` instead!")]]
108-
inline void delayMilliseconds(uint32_t ms) { delay_ms(ms); }
109-
11099
using namespace ::std::chrono_literals;
111100

112101
} // namespace modm

src/modm/board/board.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,3 @@
1515
using namespace modm::literals;
1616
using namespace std::chrono_literals;
1717
#endif
18-
19-
namespace Board {
20-
// DEPRECATE: 2022q1
21-
using systemClock [[deprecated("Use `Board::SystemClock` instead!")]] = SystemClock;
22-
}

src/modm/board/module.lb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ def prepare(module, options):
1818
# The modm_abandon function uses delay functions
1919
module.depends(":architecture:delay", ":architecture:assert")
2020

21-
# Backwards compatible move, DEPRECATE: 2022q1
22-
module.add_alias(Alias(name="blue-pill", destination="blue-pill-f103",
23-
description="Renamed for clarity."))
24-
module.add_alias(Alias(name="black-pill", destination="black-pill-f103",
25-
description="Renamed for clarity."))
26-
module.add_alias(Alias(name="mini-f401", destination="black-pill-f401",
27-
description="Renamed for clarity."))
28-
module.add_alias(Alias(name="mini-f411", destination="black-pill-f411",
29-
description="Renamed for clarity."))
3021
return True
3122

3223
def build(env):

src/modm/debug/logger/imp/std.hpp

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/modm/math/utils/arithmetic_traits.hpp

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Copyright (c) 2013, 2015, Sascha Schade
66
* Copyright (c) 2015, Kevin Läufer
77
* Copyright (c) 2018, Christopher Durand
8+
* Copyright (c) 2022, Raphael Lehmann
89
*
910
* This file is part of the modm project.
1011
*
@@ -79,7 +80,7 @@ namespace detail
7980

8081
// ------------------------------------------------------------------------
8182

82-
// implement ArithmeticTraits<T>::WideType
83+
// implement WideType<T>
8384
template<typename T>
8485
struct WideType
8586
{ using type = T; };
@@ -156,54 +157,32 @@ using UnsignedType = typename detail::MakeUnsigned<T>::type;
156157
/**
157158
* Arithmetic Traits
158159
*
159-
* Traits to give numbers more information then they have by
160-
* default in C++
160+
* Previously, some of the functionalities of <type_traits> and <limits> were
161+
* implemented here, when they were not yet available in the C++ standard
162+
* library. Only isInteger and decimalDigits are left, for all others please
163+
* use the C++ standard library in the future.
161164
*
162165
* @section provides Values provided by these traits
163166
*
164-
* - `WideType` Type that can holds the doubled length of data.
165-
* May be used to hold the result of a multiplication.
166-
* - `SignedType` Signed type for the given type. It applies
167-
* `T == SignedType` if `T` is already signed.
168-
* - `UnsignedType Some as SignedType only for unsigned types
169-
* - `min` smallest value.
170-
* - `max` biggest value
171-
* - `isSigned` is this a signed or unsigned type
172-
* - `isFloatingPoint` is this a floating point type
173167
* - `isInteger` is this a integer type
174168
* - `decimalDigits` count of digits to display this type in decimal
175169
*
176170
* @section usage Usage
177171
* @code
178-
* typedef typename modm::ArithmeticTraits<T>::WideType T_DOUBLE;
172+
* if (modm::ArithmeticTraits<T>::isInteger)
173+
* // ...
179174
*
180-
* T min = modm::ArithmeticTraits<T>::min;
181-
* T max = modm::ArithmeticTraits<T>::max;
175+
* constexpr unsigned char digits = modm::ArithmeticTraits<T>::decimalDigits;
182176
* @endcode
183-
*
184-
* @author Martin Rosekeit <[email protected]>
185-
* @author Fabian Greif <[email protected]>
186-
* @author Niklas Hauser
187-
* @author Christopher Durand
188177
*/
189178
template<typename T>
190179
struct ArithmeticTraits
191180
{
192-
// DEPRECATE: 2022q1
193-
static constexpr bool isFloatingPoint [[deprecated("use std::is_floating_point_v<T> instead!")]] = std::is_floating_point_v<T>;
194181
static constexpr bool isInteger = std::is_integral_v<T>
195182
&& !std::is_same_v<std::decay_t<T>, bool>;
196183

197-
using WideType [[deprecated("use modm::WideType<T> instead!")]] = modm::WideType<T>;
198-
using SignedType [[deprecated("use modm::SignedType<T> instead!")]] = modm::SignedType<T> ;
199-
using UnsignedType [[deprecated("use modm::UnsignedType<T> instead!")]] = modm::UnsignedType<T>;
200-
201184
static constexpr unsigned char decimalDigits =
202185
std::ceil(std::numeric_limits<T>::digits * log10(2)) + (std::is_signed_v<T> ? 1 : 0);
203-
204-
static constexpr T min [[deprecated("use std::numeric_limits<T>::min() instead!")]] = std::numeric_limits<T>::min();
205-
static constexpr T max [[deprecated("use std::numeric_limits<T>::max() instead!")]] = std::numeric_limits<T>::max();
206-
static constexpr T epsilon [[deprecated("use std::numeric_limits<T>::epsilon() instead!")]] = std::numeric_limits<T>::epsilon();
207186
};
208187
/// @}
209188

src/modm/platform/adc/stm32f0/adc.hpp.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,6 @@ public:
314314
static inline void
315315
acknowledgeInterruptFlags(InterruptFlag_t flags);
316316

317-
// DEPRECATE: 2022q1
318-
[[deprecated("Use `acknowledgeInterruptFlags(InterruptFlag_t flags)` instead!")]]
319-
static inline void
320-
acknowledgeInterruptFlag(InterruptFlag_t flags)
321-
{
322-
acknowledgeInterruptFlags(flags);
323-
}
324-
325317
public:
326318
static constexpr uint8_t TS_CAL1_TEMP{30};
327319
%% if target.family in ["f0"]

src/modm/platform/clock/stm32/rcc.hpp.in

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -593,91 +593,6 @@ public:
593593
enablePllSai(const PllSaiFactors& pllFactors, uint32_t waitCycles = 2048);
594594
%% endif
595595

596-
// DEPRECATE: 2022q1
597-
%% if target.family in ["f2", "f4", "f7", "l4", "g0", "g4"]
598-
/**
599-
* Enable PLL.
600-
*
601-
* \code
602-
* VCO input frequency = PLL input clock frequency / PLLM [with 2 <= PLLM <= 63]
603-
* VCO output frequency = VCO input frequency × PLLN [with 64 <= PLLN <= 432]
604-
* \endcode
605-
*
606-
* \param source
607-
* Source select for PLL and for plli2s. If you are using
608-
* HSE you must enable it first (see enableHse()).
609-
*
610-
* \param pllM
611-
* Division factor for the main PLL (PLL) and
612-
* audio PLL (PLLI2S) input clock (with 2 <= pllM <= 63).
613-
* The software has to set these bits correctly to ensure
614-
* that frequency of selected source divided by pllM
615-
* is in ranges from 1 to 2 MHz.
616-
*
617-
* \param pllN
618-
* Main PLL (PLL) multiplication factor for VCO (with 64 <= pllN <= 432).
619-
* The software has to set these bits correctly to ensure
620-
* that the VCO output frequency is
621-
* - 336 MHz for ST32F4. Core will run at 168 MHz.
622-
* - 240 MHz for ST32F2. Core will run at 120 MHz.
623-
*
624-
* Example:
625-
*
626-
*/
627-
[[deprecated("Use PllFactors as argument instead")]] static bool
628-
enablePll(PllSource source, uint8_t pllM, uint16_t pllN,
629-
%% if target.family in ["l4", "g0", "g4"]
630-
uint8_t pllR,
631-
%% else
632-
uint8_t pllP,
633-
%% endif
634-
uint32_t waitCycles = 2048)
635-
{
636-
PllFactors pllFactors{
637-
.pllM = pllM,
638-
.pllN = pllN,
639-
%% if target.family in ["l4", "g0", "g4"]
640-
.pllR = pllR,
641-
%% else
642-
.pllP = pllP,
643-
%% endif
644-
};
645-
return enablePll(source, pllFactors, waitCycles);
646-
}
647-
%% elif target.family in ["l1"]
648-
[[deprecated("Use PllFactors as argument instead")]] static bool
649-
enablePll(PllSource source, PllMultiplier pllMul, uint8_t pllDiv,
650-
uint32_t waitCycles = 2048)
651-
{
652-
PllFactors pllFactors{
653-
.pllMul = pllMul,
654-
.pllDiv = pllDiv,
655-
};
656-
return enablePll(source, pllFactors, waitCycles);
657-
}
658-
%% elif target.family in ["f0", "f1", "f3"]
659-
[[deprecated("Use PllFactors as argument instead")]] static bool
660-
enablePll(PllSource source,
661-
uint8_t pllMul,
662-
%% if pllprediv2
663-
uint8_t pllPrediv, uint8_t pllPrediv2,
664-
%% elif pllprediv
665-
uint8_t pllPrediv,
666-
%% endif
667-
uint32_t waitCycles = 2048)
668-
{
669-
PllFactors pllFactors{
670-
.pllMul = pllMul,
671-
%% if pllprediv2
672-
.pllPrediv = pllPrediv,
673-
.pllPrediv2 = pllPrediv2,
674-
%% elif pllprediv
675-
.pllPrediv = pllPrediv,
676-
%% endif
677-
};
678-
return enablePll(source, pllFactors, waitCycles);
679-
}
680-
%% endif
681596
%% if target.family == "l0"
682597
static inline bool
683598
isHsiPredivider4Active()
@@ -951,9 +866,6 @@ private:
951866
computeFlashLatency(uint32_t Core_Hz, uint16_t Core_mV);
952867
};
953868

954-
// DEPRECATE: 2022q1
955-
using ClockControl [[deprecated("Please use `modm::platform:Rcc` instead")]] = Rcc;
956-
957869
} // namespace modm::platform
958870

959871

src/modm/platform/clock/systick/systick_timer.hpp.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,4 @@ private:
107107

108108
}
109109

110-
namespace modm::cortex
111-
{
112-
// DEPRECATE: 2022q1
113-
using SysTickTimer [[deprecated("Use `modm::platform:SysTickTimer` instead!")]] =
114-
::modm::platform::SysTickTimer;
115-
}
116-
117110
#endif // MODM_STM32_CORTEX_TIMER_HPP

src/modm/platform/timer/stm32/general_purpose_base.hpp.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ public:
116116
ForceInactive = TIM_CCMR1_OC1M_2,
117117
/// Output is forced high
118118
ForceActive = TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0,
119-
// DEPRECATE: 2022q1
120-
ForceLow [[deprecated("Use ForceInactive instead.")]] = ForceInactive,
121-
ForceHigh [[deprecated("Use ForceActive instead.")]] = ForceActive,
122119

123120
/**
124121
* PWM Mode 1.

0 commit comments

Comments
 (0)