3 ms·
@author: 1 @ Set BR8 field in GPIOA_BSRR, to clear GPIOA8 2 movw r1, #0x0000 3 movt r1, #0x0100 you can just use a mov to get that value.
by dmitrygr 7y ago
@author:
1 @ Set BR8 field in GPIOA_BSRR, to clear GPIOA8
2 movw r1, #0x0000
3 movt r1, #0x0100
you can just use a mov to get that value. Any 8-bit value shifted left any number of bits is synthesizable using one MOV
- lochsh 7y agoThis is true! If I was writing something to be optimal speed- and size-wise, I'd do that. I think I just liked the consistency with the other parts of the code where using both was necessary :)
- lochsh 7y agoOh actually I was being sleepy and hadn't understood what you'd said! I hadn't realised you could do that actually, neat, thanks! So you could do `mov r1, #0x01000000` right? nice.