diff options
| author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-30 12:47:38 +0000 | 
|---|---|---|
| committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-30 12:47:38 +0000 | 
| commit | 3221ecd80929d9f29ada6633c64c58e84c97d0fd (patch) | |
| tree | 14105de3cfea4f9fa01a62b62d22999093de5bac | |
| parent | 74418f87ad5af3387c37495cae1b3e3d77d53de1 (diff) | |
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
| -rw-r--r-- | openpcd/firmware/src/rc632.c | 14 | 
1 files 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;  } | 
