OSDN Git Service

301873bf47a5149d31824cc8dd7a329c4c47592b
[kozos-expbrd/kozos_expbrd.git] / firm / sample / simple_mp3_player / os / lowio / portconf.h
1
2 #ifndef PORTCONF_H
3 #define PORTCONF_H
4
5 /*
6  * Data Direction Register
7  */
8
9 #define PORTCONF_P1DDR  ((volatile uint8 *)0xfee000)
10 #define PORTCONF_P2DDR  ((volatile uint8 *)0xfee001)
11 #define PORTCONF_P4DDR  ((volatile uint8 *)0xFEE003)
12 #define PORTCONF_P8DDR  ((volatile uint8 *)0xfee007)
13 #define PORTCONF_PADDR  ((volatile uint8 *)0xFEE009)
14 #define PORTCONF_PBDDR  ((volatile uint8 *)0xfee00a)
15
16 /*
17  * Port Data Register
18  */
19
20 #define PORTCONF_P4DR   ((volatile uint8 *)0xFFFFD3)
21 #define PORTCONF_P7DR   ((volatile uint8 *)0xFFFFD6)
22 #define PORTCONF_PADR   ((volatile uint8 *)0xFFFFD9)
23 #define PORTCONF_PBDR   ((volatile uint8 *)0xFFFFDA)
24
25 /*
26  * Bit
27  */
28
29 #define PORTCONF_PABIT_LEDG     (1 << 2)
30 #define PORTCONF_PABIT_LEDR     (1 << 3)
31 #define PORTCONF_PABIT_SWRE     (1 << 4)
32 #define PORTCONF_PABIT_LED1     (1 << 6)
33 #define PORTCONF_PABIT_LED2     (1 << 7)
34
35 #define PORTCONF_PBBIT_SCLK     (1 << 5)
36 #define PORTCONF_PBBIT_MOSI     (1 << 6)
37 #define PORTCONF_PBBIT_MISO     (1 << 7)
38
39 #define PORTCONF_P4BIT_SDCCS    (1 << 0)
40 #define PORTCONF_P4BIT_SDCDET   (1 << 1)
41 #define PORTCONF_P4BIT_VSCCS    (1 << 2)
42 #define PORTCONF_P4BIT_VSDCS    (1 << 3)
43 #define PORTCONF_P4BIT_VSDREQ   (1 << 4)
44 #define PORTCONF_P4BIT_VSRST    (1 << 5)
45 #define PORTCONF_P4BIT_LCD_RES  (1 << 7)
46
47 #define PORTCONF_P7BIT_SW1      (1 << 0)
48 #define PORTCONF_P7BIT_SW2      (1 << 1)
49
50 /*
51  * Utilities
52  */
53 #define PORTCONF_SDC_DETECT()   (!(*PORTCONF_P4DR & PORTCONF_P4BIT_SDCDET))
54
55 #endif
56