X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ccdbg.c;h=3fcf7053138df240ea04f97e735976cde72a92e4;hp=a2b5946db62ec0ad8e4d7fd14a9ff0e18a492c22;hb=5df84df7cd6a31527dcfd11030f00ef9d8abf170;hpb=01cb2799875e086ee6096627c058ee235bbc33d5 diff --git a/ccdbg.c b/ccdbg.c index a2b5946d..3fcf7053 100644 --- a/ccdbg.c +++ b/ccdbg.c @@ -23,13 +23,22 @@ main (int argc, char **argv) { struct ccdbg *dbg; uint8_t status; + uint16_t chip_id; dbg = ccdbg_open("/dev/ttyUSB0"); if (!dbg) exit (1); - ccdbg_reset(dbg); +#if 0 + ccdbg_manual(dbg, stdin); +#endif +#if 1 + ccdbg_debug_mode(dbg); status = ccdbg_read_status(dbg); printf("Status: 0x%02x\n", status); + chip_id = ccdbg_get_chip_id(dbg); + printf("Chip id: 0x%04x\n", chip_id); + ccdbg_reset(dbg); +#endif ccdbg_close(dbg); exit (0); }