15template <
typename FunctionType>
22template <
typename FunctionType>
24 std::is_invocable_v<FunctionType, volatile void*, int32_t>;
31template <
typename FunctionType>
35 function(addr, dsize);
38template <
typename FunctionType>
39 requires(!DCacheFunctionAcceptsVoidPtr<FunctionType> &&
40 DCacheFunctionAcceptsVolatileVoidPtr<FunctionType>)
43 function(
reinterpret_cast<volatile void*
>(addr), dsize);
46template <
typename FunctionType>
47 requires(!DCacheFunctionAcceptsVoidPtr<FunctionType> &&
48 !DCacheFunctionAcceptsVolatileVoidPtr<FunctionType>)
51 function(
reinterpret_cast<uint32_t*
>(addr), dsize);
60#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
61 auto* raw =
const_cast<void*
>(addr);
62 const auto dsize =
static_cast<int32_t
>(size);
76#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
77 auto* raw =
const_cast<void*
>(addr);
78 const auto dsize =
static_cast<int32_t
>(size);
D-Cache API accepts void*
D-Cache API accepts volatile void*
void STM32_InvalidateDCacheByAddr(const void *addr, size_t size)
Invalidates D-Cache lines covering the specified memory range.
void STM32_CallDCacheByAddr(FunctionType function, void *addr, int32_t dsize)
Calls the CMSIS D-Cache helper with the pointer type accepted by the current toolchain.
void STM32_CleanDCacheByAddr(const void *addr, size_t size)
Cleans D-Cache lines covering the specified memory range.