Last active
December 28, 2015 02:39
-
-
Save oyvindrobertsen/7429983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.thumb | |
.syntax unified | |
.include "gpio_constants.s" // Register-adresser og konstanter for GPIO | |
.text | |
.global Start | |
.global GPIO_ODD_IRQHandler | |
Start: | |
MOV R0, #5 | |
BAL Start | |
.thumb_func | |
GPIO_ODD_IRQHandler: | |
// Do the actual toggling | |
LDR R0, =GPIO_BASE | |
MOV R1, #0b00000100 // pins 0-7 from right to left | |
STR R1, [R0, #PORT_SIZE * PORT_E + GPIO_PORT_DOUTTGL] | |
// Clear interrupt flag | |
LDR R0, =GPIO_BASE | |
LDR R1, [R0, #GPIO_IF] | |
STR R1, [R0, #GPIO_IFC] | |
BX LR | |
NOP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment