ghhhhhk8899jj·5 年前·議論Making your own custom USB device has quite a large upfront cost since you need to buy a PID/VID.
ghhhhhk8899jj·5 年前·議論volatile does not imply compiler fence on gcc, so this code has a race condition when updating read/write_position, you need compiler barriers here>data[write_position] = value;>COMPILER_BARRIER(); // __asm__ volatile("":::"memory");>write_position = (write_position + 1U) % LENGTH;and same in Skip()
ghhhhhk8899jj·5 年前·議論For now... Wait a few months/a year and they will find a reason to "take advantage" of that increase in performance and slow it back down again.
ghhhhhk8899jj·6 年前·議論I always find "language X is faster than Y" statements funny when language X's runtime is written in language Y.