Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .syntax unified
- .global main
- .type main, %function
- main:
- bl init
- mov r5, 109 @ tick counter
- mov r0, 0xb1e0 @-22000
- mov r6, r0
- loop:
- @1. Calculate the next value in the sawtooth signal
- cmp r5, 0
- beq reset
- add r6, 0x193
- mov r0, r6
- @2. bl to BSP_AUDIO_OUT_Play_Sample with that value in r0
- sub r5, 1
- bl BSP_AUDIO_OUT_Play_Sample
- b loop
- reset:
- mov r5, 109
- mov r0, 0xb1e0
- mov r6, r0
- @3. go back to the top of the loop to do it again for the next value
- b loop
- .size main, .-main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement