annotate loadtools/ltmisc.c @ 70:e2698daf40d1

dieid implemented in fc-loadtool as well
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 26 Jul 2013 17:51:49 +0000
parents
children 0c1480317c18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This module is a place to implement little miscellaneous fc-loadtool
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * commands which don't belong anywhere else.
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 */
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 #include <sys/types.h>
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stdio.h>
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <stdint.h>
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 cmd_dieid()
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 {
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 uint32_t addr;
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 uint16_t data;
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 int stat;
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 for (addr = 0xFFFEF010; addr <= 0xFFFEF016; addr += 2) {
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 stat = do_r16(addr, &data);
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 if (stat)
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 return(stat);
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 printf("%08lX: %04X\n", (u_long)addr, (int)data);
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 }
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 return(0);
e2698daf40d1 dieid implemented in fc-loadtool as well
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 }