fix up long types in printfs

from Clive Stubbings.
This commit is contained in:
Mariano Alvira 2010-03-15 07:24:48 -04:00
parent 44a1c7b1fb
commit 07e6b65182
2 changed files with 8 additions and 8 deletions

View file

@ -70,29 +70,29 @@ void Print_Packets(char *s) {
int i = 0;
printf("packet pool after %s:\n\r",s);
p = free_head;
printf("free_head: 0x%x ", (uint32_t) free_head);
printf("free_head: 0x%lx ", (uint32_t) free_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x", (uint32_t) p);
printf("->0x%lx", (uint32_t) p);
}
printf("\n\r");
p = tx_head;
printf("tx_head: 0x%x ", (uint32_t) tx_head);
printf("tx_head: 0x%lx ", (uint32_t) tx_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x", (uint32_t) p);
printf("->0x%lx", (uint32_t) p);
}
printf("\n\r");
p = rx_head;
printf("rx_head: 0x%x ", (uint32_t) rx_head);
printf("rx_head: 0x%lx ", (uint32_t) rx_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x", (uint32_t) p);
printf("->0x%lx", (uint32_t) p);
}
printf("\n\r");
printf("found %d packets\n\r",i);

View file

@ -35,9 +35,9 @@ void dump_regs(uint32_t base, uint32_t len) {
printf("base +0 +4 +8 +c +10 +14 +18 +1c \n\r");
for (i = 0; i < len; i ++) {
if ((i & 7) == 0) {
printf("%02x",(uint32_t)(4 * i));
printf("%02lx",(uint32_t)(4 * i));
}
printf(" %08x",(uint32_t)*mem32(base+(4*i)));
printf(" %08lx",(uint32_t)*mem32(base+(4*i)));
if ((i & 7) == 7)
printf(NL);
}