FreeCalypso > hg > freecalypso-sw
comparison target-utils/pirexplore/lcd.c @ 74:8138a6380ae3
pirexplore: attempt to play with SPCA552E
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 27 Jul 2013 07:30:08 +0000 |
parents | |
children | 07b686248ab7 |
comparison
equal
deleted
inserted
replaced
73:c54c6ad1c66f | 74:8138a6380ae3 |
---|---|
1 #include <sys/types.h> | |
2 #include "types.h" | |
3 | |
4 void | |
5 cmd_spca(argbulk) | |
6 char *argbulk; | |
7 { | |
8 char *argv[3]; | |
9 u_long addr, data; | |
10 | |
11 if (parse_args(argbulk, 2, 2, argv, 0) < 0) | |
12 return; | |
13 if (parse_hexarg(argv[0], 4, &addr) < 0) { | |
14 printf("ERROR: arg1 must be a valid 16-bit hex value\n"); | |
15 return; | |
16 } | |
17 if (parse_hexarg(argv[1], 4, &data) < 0) { | |
18 printf("ERROR: arg2 must be a valid 16-bit hex value\n"); | |
19 return; | |
20 } | |
21 *(volatile u16 *)0x02800000 = addr; | |
22 *(volatile u16 *)0x02800002 = data; | |
23 } |