- " swap %[bit]\n" // rotate by 4 (AO_LED_SERIAL is 4)
- " andi %[bit], 0xf0\n" // mask off other 4 bits
- " or %[v], %[bit]\n" // add to register
- " out %[port], %[v]\n" // write current value
- " lsr %[w_hi]\n" // shift data
- " ror %[w_lo]\n" // ...
+#if AO_LED_SERIAL >= 1
+ " add %[bit],%[bit]\n" // shift by one
+#else
+ " nop\n"
+#endif
+#if AO_LED_SERIAL >= 2
+ " add %[bit],%[bit]\n" // shift by one
+#else
+ " nop\n"
+#endif
+#if AO_LED_SERIAL >= 3
+ " add %[bit],%[bit]\n" // shift by one
+#else