FreeCalypso > hg > freecalypso-sw
annotate target-utils/pirexplore/main.c @ 67:b8f335553000
pirexplore utility started
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 26 Jul 2013 04:57:03 +0000 |
parents | |
children | a323b4cc69e6 |
rev | line source |
---|---|
67
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include "types.h" |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include "romvars.h" |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 extern struct boot_rom_vars rom_vars; |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 extern char *uart_name; |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 main() |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 { |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 uart_select_init(); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 printf("Pirelli hardware exploration utility running\n"); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 printf("Loaded via UART %d (%s) at baud rate #%d\n", rom_vars.uart_id, |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 uart_name, rom_vars.baud_rate_code); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 printf("TCXO clock input autodetected to be %d MHz\n", |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 rom_vars.clktcxo_13mhz ? 13 : 26); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 for (;;) { |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 putchar('='); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 if (command_entry()) |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 command_dispatch(); |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 } |
b8f335553000
pirexplore utility started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 } |