Ja, guter Ansatz. Nur schade, dass das mühsam errechnete Ergebnis so achtlos weggeworfen wird.Zitat von thewulf00
Besser:
Code:static inline void bitswp2_4(uint8_t *b) { asm volatile ( "mov __tmp_reg__, %0" "\n\t" "bst %0,2" "\n\t" "bld %0,4" "\n\t" "bst __tmp_reg__,4" "\n\t" "bld %0,2" "\n\t" : "=d" (*b) : "0" (*b) ); }
Lesezeichen