File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323#define Scheduler_global_timer ((TIM_TypeDef*)Scheduler::global_timer_base)
2424
25- /* bit field insert
26- * (internally) mask = ((1UL << width) - 1) << pos
27- * dest = (dest & ~mask) | (source & mask)
28- * With the condition that pos and width are immediate values
29- * ref: https://developer.arm.com/documentation/dui0646/c/The-Cortex-M7-Instruction-Set/Bit-field-instructions/BFC-and-BFI
30- */
31- #define BFI (dest, source, pos, width ) \
32- __asm__ ( \
33- " bfi %0, %1, %2, %3" \
34- : " +r" (dest) \
35- : "r" (source), "i" (pos), "i" (width) \
36- )
37-
3825namespace {
3926constexpr uint64_t kMaxIntervalUs =
4027 static_cast <uint64_t >(std::numeric_limits<uint32_t >::max()) + 1ULL ;
@@ -208,7 +195,7 @@ void Scheduler::remove_sorted(uint8_t id) {
208195 pattern_32 = pattern_32 + (pattern_32 << 8 );
209196 pattern_32 = pattern_32 + (pattern_32 << 16 );
210197 uint64_t pattern = pattern_32;
211- BFI ((( uint32_t *)&pattern)[1 ], pattern_32, 0 , 32 ) ;
198+ (( uint32_t *)&pattern)[1 ] = pattern_32 ;
212199
213200#pragma GCC diagnostic pop
214201
You can’t perform that action at this time.
0 commit comments