add debug shm
This commit is contained in:
parent
f7dc5b3bd8
commit
cd7ac81a2d
@ -29,6 +29,7 @@
|
||||
#define DEBUG_SRAM_RAW 16
|
||||
#define DEBUG_SREG 32
|
||||
#define DEBUG_CRC 64
|
||||
#define DEBUG_SHM 128
|
||||
|
||||
#define REQ_STATUS_IDLE 0x01
|
||||
#define REQ_STATUS_UPLOAD 0x02
|
||||
|
||||
@ -70,7 +70,7 @@ void shared_memory_irq_restore()
|
||||
void shared_memory_write(uint8_t cmd, uint8_t value)
|
||||
{
|
||||
|
||||
info("Write shared memory 0x%04x=0x%02x 0x%04x=0x%02x \n",
|
||||
debug(DEBUG_SHM,"shared_memory_write: 0x%04x=0x%02x 0x%04x=0x%02x \n",
|
||||
SHARED_MEM_TX_LOC_CMD, cmd, SHARED_MEM_TX_LOC_PAYLOAD, value);
|
||||
|
||||
shared_memory_scratchpad_tx_save();
|
||||
@ -127,7 +127,7 @@ int shared_memory_read(uint8_t *cmd, uint8_t *len,uint8_t *buffer)
|
||||
|
||||
*cmd = sram_read(SHARED_MEM_RX_LOC_CMD);
|
||||
*len = sram_read(SHARED_MEM_RX_LOC_LEN);
|
||||
info("Read shared memory 0x%04x=0x%02x 0x%04x=0x%02x \n",
|
||||
debug(DEBUG_SHM,"shared_memory_read: 0x%04x=0x%02x 0x%04x=0x%02x \n",
|
||||
SHARED_MEM_RX_LOC_CMD, *cmd, SHARED_MEM_RX_LOC_LEN, *len);
|
||||
|
||||
sram_bulk_read_buffer(SHARED_MEM_RX_LOC_PAYLOAD,buffer, *len);
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#define SHARED_MEM_SWITCH_IRQ 0
|
||||
#define SHARED_MEM_SWITCH_DELAY 100
|
||||
#define SHARED_MEM_SWITCH_DELAY 20
|
||||
|
||||
#define SHARED_MEM_TX_SNES_ACK 0xa5
|
||||
#define SHARED_MEM_TX_SNES_RTS 0x5a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user