Skip to content

Commit 4591370

Browse files
committed
fix: ITM declaration change in CMSIS_6
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent f1dac87 commit 4591370

File tree

1 file changed

+9
-0
lines changed
  • libraries/SrcWrapper/src/stm32

1 file changed

+9
-0
lines changed

libraries/SrcWrapper/src/stm32/dwt.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,20 @@ void dwt_access(bool ena)
5858
* Define DWT LSR mask which is (currentuly) not defined by the CMSIS.
5959
* Same as ITM LSR one.
6060
*/
61+
6162
#if !defined DWT_LSR_Present_Msk
63+
#if defined(ITM_LSR_PRESENT_Msk)
64+
#define DWT_LSR_Present_Msk ITM_LSR_PRESENT_Msk
65+
#else
6266
#define DWT_LSR_Present_Msk ITM_LSR_Present_Msk
6367
#endif
68+
#endif
6469
#if !defined DWT_LSR_Access_Msk
70+
#if defined(ITM_LSR_ACCESS_Msk)
71+
#define DWT_LSR_Access_Msk ITM_LSR_ACCESS_Msk
72+
#else
6573
#define DWT_LSR_Access_Msk ITM_LSR_Access_Msk
74+
#endif
6675
#endif
6776
uint32_t lsr = DWT->LSR;
6877

0 commit comments

Comments
 (0)