]> git.sur5r.net Git - openocd/blobdiff - src/target/arm_adi_v5.h
initial SWD transport (SWD infrastructure #2)
[openocd] / src / target / arm_adi_v5.h
index 6c1808a5cb68c007fa86dd38faf5a76b41c36a85..f64f7c8404e3248d6d4d57d8c9c64a7cf96cc3c4 100644 (file)
@@ -59,6 +59,9 @@
 #define DP_SELECT              0x8             /* JTAG: r/w; SWD: write */
 #define DP_RDBUFF              0xC             /* read-only */
 
+#define WCR_TO_TRN(wcr) (1 + (3 & ((wcr)) >> 8))       /* 1..4 clocks */
+#define WCR_TO_PRESCALE(wcr) (7 & ((wcr)))             /* impl defined */
+
 /* Fields of the DP's AP ABORT register */
 #define DAPABORT               (1 << 0)
 #define STKCMPCLR              (1 << 1)        /* SWD-only */