Skip to content

Instantly share code, notes, and snippets.

@memoryleak
Created November 4, 2019 12:20
Show Gist options
  • Save memoryleak/55dcb837324689c378297ffba4a7f87f to your computer and use it in GitHub Desktop.
Save memoryleak/55dcb837324689c378297ffba4a7f87f to your computer and use it in GitHub Desktop.
ldr r2,[r0,#4] ;# Get current register contents
ldr r1,#7 ;# bit mask
lsl r1,#21 ;# shift it to the right gpio bits
bic r2,r2 ;# clear the bits
mov r1,#1 ;# write mode
lsl r1,#21 ;# shift it to the right bits
orr r1,r2 ;# combine with the state of the other gpios
str r1,[r0,#28] ;# Update the register contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment