From 3221ecd80929d9f29ada6633c64c58e84c97d0fd Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Sun, 30 Jul 2006 12:47:38 +0000 Subject: skip FIFO DATA register to prevent altering fifo state while dumping git-svn-id: https://svn.openpcd.org:2342/trunk@68 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/firmware/src/rc632.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/openpcd/firmware/src/rc632.c b/openpcd/firmware/src/rc632.c index 54d06cd..8982395 100644 --- a/openpcd/firmware/src/rc632.c +++ b/openpcd/firmware/src/rc632.c @@ -472,7 +472,11 @@ int rc632_dump(void) u_int16_t rx_len = sizeof(spi_inbuf); for (i = 0; i <= 0x3f; i++) { - spi_outbuf[i] = i << 1; + u_int8_t reg = i; + if (reg == RC632_REG_FIFO_DATA) + reg = 0x3e; + + spi_outbuf[i] = reg << 1; spi_inbuf[i] = 0x00; } @@ -485,8 +489,12 @@ int rc632_dump(void) spi_transceive(spi_outbuf, 0x41, spi_inbuf, &rx_len); - for (i = 0; i < 0x3f; i++) - DEBUGPCR("REG 0x%02x = 0x%02x", i, spi_inbuf[i+1]); + for (i = 0; i < 0x3f; i++) { + if (i == RC632_REG_FIFO_DATA) + DEBUGPCR("REG 0x02 = NOT READ"); + else + DEBUGPCR("REG 0x%02x = 0x%02x", i, spi_inbuf[i+1]); + } return 0; } -- cgit v1.2.3