Question
Output word into two bytes on different ports. Is there a faster way?
Posted on June 26, 2014 at 11:40
I would like to optimize next snippet:
void
write16Data(u16 data) {
GPIOA->BSRR = 0x00ff0000 | (u8)(data & 0xff);
GPIOB->BSRR = 0x00ff0000 | (u8)(data >> 8);
} Any ideas?