Skip to content

Instantly share code, notes, and snippets.

@oyvindrobertsen
Created November 7, 2013 13:16
Show Gist options
  • Select an option

  • Save oyvindrobertsen/7354416 to your computer and use it in GitHub Desktop.

Select an option

Save oyvindrobertsen/7354416 to your computer and use it in GitHub Desktop.
Start:
LDR R0, =GPIO_BASE
MOV R1, PORT_SIZE
MOV R2, PORT_E
MOV R3, GPIO_PORT_DOUTSET
MUL R1, R1, R2
ADD R1, R1, R3
ADD R0, R0, R1 // R1 is hex amount of bytes to offset GPIO_BASE with, PORT_SIZE*PORT + REG
MOV R1, #0b00000100
STR R1, [R0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment