FreeCalypso > hg > freecalypso-tools
annotate target-utils/lunadrv/main.c @ 820:03457a66d860
buzplayer: add basic support for PWT
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 30 May 2021 03:39:58 +0000 |
parents | db9a8e88e63f |
children |
rev | line source |
---|---|
700
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #include "types.h" |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 main() |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 { |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 uart_select_init(); |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 printf("Luna LCD driver utility running\n"); |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 print_boot_rom_info(); |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 /* Calypso MEMIF setup */ |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 *(volatile u16 *)0xfffffb00 = 0x00A4; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 *(volatile u16 *)0xfffffb02 = 0x00A4; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 *(volatile u16 *)0xfffffb04 = 0x00A4; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 *(volatile u16 *)0xfffffb06 = 0x02A5; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 *(volatile u16 *)0xfffef006 = 0x0008; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 /* GPIO setup for backlight control */ |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 *(volatile u16 *)0xfffef00a = 0x01E0; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 *(volatile u16 *)0xfffe4802 = 0x0200; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 *(volatile u16 *)0xfffe4804 = 0xFDFF; |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 for (;;) { |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 putchar('='); |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 if (command_entry()) |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 command_dispatch(); |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 } |
db9a8e88e63f
target-utils lunadrv program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 } |