show LED state change only if SHOW_LEDS is defined

Tue, 20 Nov 2012 23:31:03 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Tue, 20 Nov 2012 23:31:03 +0000
changeset 117
73caf968b67b
parent 116
21521e62007f
child 118
feee84e0b3bf

show LED state change only if SHOW_LEDS is defined

src/memory.c file | annotate | diff | revisions
     1.1 diff -r 21521e62007f -r 73caf968b67b src/memory.c
     1.2 --- a/src/memory.c	Sat Nov 17 22:26:53 2012 +0000
     1.3 +++ b/src/memory.c	Tue Nov 20 23:31:03 2012 +0000
     1.4 @@ -386,11 +386,13 @@
     1.5  				state.dma_reading = (data & 0x4000);
     1.6  				if (state.leds != ((~data & 0xF00) >> 8)) {
     1.7  					state.leds = (~data & 0xF00) >> 8;
     1.8 +#ifdef SHOW_LEDS
     1.9  					printf("LEDs: %s %s %s %s\n",
    1.10  							(state.leds & 8) ? "R" : "-",
    1.11  							(state.leds & 4) ? "G" : "-",
    1.12  							(state.leds & 2) ? "Y" : "-",
    1.13  							(state.leds & 1) ? "R" : "-");
    1.14 +#endif
    1.15  				}
    1.16  				handled = true;
    1.17  				break;