- Timestamp:
- 09/17/11 21:53:11 (8 months ago)
- File:
-
- 1 edited
-
trunk/ichspi.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ichspi.c
r1443 r1444 295 295 static void prettyprint_opcodes(OPCODES *ops) 296 296 { 297 if(ops == NULL) 297 OPCODE oc; 298 const char *t; 299 const char *a; 300 uint8_t i; 301 static const char *const spi_type[4] = { 302 "read w/o addr", 303 "write w/o addr", 304 "read w/ addr", 305 "write w/ addr" 306 }; 307 static const char *const atomic_type[3] = { 308 "none", 309 " 0 ", 310 " 1 " 311 }; 312 313 if (ops == NULL) 298 314 return; 299 315 300 msg_pdbg("preop0=0x%02x, preop1=0x%02x\n", ops->preop[0], 301 ops->preop[1]); 302 303 OPCODE oc; 304 uint8_t i; 316 msg_pdbg2(" OP Type Pre-OP\n"); 305 317 for (i = 0; i < 8; i++) { 306 318 oc = ops->opcode[i]; 307 msg_pdbg("op[%d]=0x%02x, %d, %d\n",308 i,309 oc.opcode,310 oc.spi_type,311 oc.atomic);312 }319 t = (oc.spi_type > 3) ? "invalid" : spi_type[oc.spi_type]; 320 a = (oc.atomic > 2) ? "invalid" : atomic_type[oc.atomic]; 321 msg_pdbg2("op[%d]: 0x%02x, %s, %s\n", i, oc.opcode, t, a); 322 } 323 msg_pdbg2("Pre-OP 0: 0x%02x, Pre-OP 1: 0x%02x\n", ops->preop[0], 324 ops->preop[1]); 313 325 } 314 326 … … 673 685 msg_pdbg("done\n"); 674 686 prettyprint_opcodes(curopcodes); 675 msg_pdbg("\n");676 687 return 0; 677 688 }
Note: See TracChangeset
for help on using the changeset viewer.
