Skip to content

Commit 9154b53

Browse files
authored
Print emulator pin state after chip_digital_write (#313)
1 parent 36f965b commit 9154b53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Primitives/emulated.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,15 @@ def_prim(chip_digital_write, twoToNoneU32) {
411411
if (writable) {
412412
PINS[pin] = val;
413413
}
414+
printf("EMU: ");
415+
for (int i = 0; i < NUM_DIGITAL_PINS / 2; i++) {
416+
printf("%d ", PINS[i]);
417+
}
418+
printf("\nEMU: ");
419+
for (int i = NUM_DIGITAL_PINS / 2; i < NUM_DIGITAL_PINS; i++) {
420+
printf("%d ", PINS[i]);
421+
}
422+
printf("\n");
414423
pop_args(2);
415424
return writable;
416425
}

0 commit comments

Comments
 (0)