PWM
#file: LEDR.s .include "macros.inc" SET_TARGET .text FUNCTION LEDR_Init, global push {lr} bl gpio_d_init pop {lr} bx lr ENDFUNC LEDR_Init FUNCTION LEDR_Put_A, global push {lr} mov r1, r0 bl gpio_d_get_current ldr r2,=#(~(~0<<3)) and r1, r2 lsl r1,#8 lsl r2,#8 mvn r2,r2 and r0,r2 orr r0,r1 bl gpio_d_put pop {lr} bx lr ENDFUNC LEDR_Put_A FUNCTION LEDR_Put_B, global push {lr} mov r1, r0 bl gpio_d_get_current ldr r2,=#(~(~0<<4)) and r1, r2 lsl r1, #2 lsl r2, #2 mvn r2, r2 and r0, r2 orr r0, r1 bl gpio_d_put pop {lr} bx lr ENDFUNC LEDR_Put_B .end