debug tool for STM32F042F6P6

Revision:
0:98789a3f7363
Child:
24:bc7c4e8f3fe0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/check_alternative_mode.s	Mon Apr 15 13:00:43 2019 +0000
@@ -0,0 +1,29 @@
+    AREA asm_func, CODE, READONLY
+; Export my_asm function location so that C compiler can find it and link
+    EXPORT check_alternative_mode
+check_alternative_mode
+
+    PUSH {LR}
+    ;R0 = GPIOx
+    ;R1 = offset
+    ;r2 = pin_number
+    
+
+    LDR R3, [R0, R1]
+    
+    LDR R0, =28
+    SUBS R0,R2
+    SUBS R0,R2
+    SUBS R0,R2
+    SUBS R0,R2
+        
+    LSLS R3,R3,R0
+    LSRS R3,#28
+    
+    MOVS R0,R3
+   
+    POP {PC}
+
+    ALIGN
+    END
+