annotate target-utils/c139explore/main.c @ 990:2a867e5768e9

fc-dspapidump fix: be independent of host byte order
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 12 Dec 2015 20:07:51 +0000
parents eb27543ce18e
children d92e4aadeeb3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
946
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 #include "types.h"
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 #include "ns16550.h"
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 struct ns16550_regs *uart_base;
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 main()
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 {
948
c73516dd50bb c139explore: delay before greeting printf to work around defect in fc-compalram
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 946
diff changeset
8 /* delay kludge workaround for defect in fc-compalram */
c73516dd50bb c139explore: delay before greeting printf to work around defect in fc-compalram
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 946
diff changeset
9 osmo_delay_ms(30);
946
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 uart_base = (struct ns16550_regs *) 0xFFFF5800;
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 printf("C139 hardware exploration utility running\n");
949
df1dccc0ef9c c139explore: GPIO init and backlight on/off control implemented
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 948
diff changeset
12 /* GPIO init */
df1dccc0ef9c c139explore: GPIO init and backlight on/off control implemented
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 948
diff changeset
13 *(volatile u16 *)0xfffe4802 = 0x0002;
df1dccc0ef9c c139explore: GPIO init and backlight on/off control implemented
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 948
diff changeset
14 *(volatile u16 *)0xfffe4804 = 0xFFF5;
951
eb27543ce18e c139explore: elementary operation commands lcdcmd and lcdpix added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 950
diff changeset
15 /* take peripherals out of reset */
eb27543ce18e c139explore: elementary operation commands lcdcmd and lcdpix added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 950
diff changeset
16 *(volatile u16 *)0xfffffd04 = 0xFFF3;
949
df1dccc0ef9c c139explore: GPIO init and backlight on/off control implemented
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 948
diff changeset
17 abb_init();
950
cd34e0d534b9 c139explore: LCD output implemented, does not work
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 949
diff changeset
18 uwire_init();
946
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 for (;;) {
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 putchar('=');
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 if (command_entry())
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 command_dispatch();
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 }
845c2e420069 target-utils/c139explore utility started
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 }