debug tool for STM32F042F6P6

check_2_bit.s

Committer:
bieleluk
Date:
2019-05-27
Revision:
24:bc7c4e8f3fe0
Parent:
0:98789a3f7363

File content as of revision 24:bc7c4e8f3fe0:

    AREA asm_func, CODE, READONLY
    EXPORT check_2_bit
check_2_bit

    PUSH {LR}
    ;R0 = GPIOx
    ;R1 = offset
    ;r2 = pin_number
    

    LDR R3, [R0, R1]
    
    LDR R0, =30
    SUBS R0,R2
    SUBS R0,R2    
    LSLS R3,R3,R0
    LSRS R3,#30
    
    MOVS R0,R3
    
    POP {PC}


    ALIGN
    END