- for (bit = 7; bit >= 0; bit--)
- ccdbg_write_bit(dbg, (byte >> bit) & 1);
+void
+ccdbg_send_byte(struct ccdbg *dbg, uint8_t byte)
+{
+ int bit;
+ ccdbg_debug(CC_DEBUG_BITBANG, "#\n# Send Byte 0x%02x\n#\n", byte);
+ for (bit = 7; bit >= 0; bit--) {
+ ccdbg_send_bit(dbg, (byte >> bit) & 1);
+ if (bit == 3)
+ ccdbg_debug(CC_DEBUG_BITBANG, "\n");
+ }
+}
+
+void
+ccdbg_send_bytes(struct ccdbg *dbg, uint8_t *bytes, int nbytes)
+{
+ while (nbytes--)
+ ccdbg_send_byte(dbg, *bytes++);