OSDN Git Service

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