18 #ifndef __BSP_DK_BCREG_3201_H
19 #define __BSP_DK_BCREG_3201_H
41 #define BC_REGISTER_BASE 0x80000000
42 #define BC_SSD2119_BASE 0x84000000
43 #define BC_PSRAM_BASE 0x88000000
44 #define BC_FLASH_BASE 0x8C000000
73 __IO uint16_t RESERVERD1[0x02];
105 __IO uint16_t RESERVERD3[0x19];
125 #define BC_REGISTER ((BC_TypeDef *) BC_REGISTER_BASE)
128 #define BC_EM_EM0 (0)
129 #define BC_EM_EM1 (1)
130 #define BC_EM_EM2 (2)
131 #define BC_EM_EM3 (3)
132 #define BC_EM_EM4 (4)
135 #define BC_MAGIC_VALUE (0xef32)
138 #define BC_UIF_PB_MASK (0x000f)
139 #define BC_UIF_PB1 (1 << 0)
140 #define BC_UIF_PB2 (1 << 1)
141 #define BC_UIF_PB3 (1 << 2)
142 #define BC_UIF_PB4 (1 << 3)
145 #define BC_DIPSWITCH_MASK (0x000f)
148 #define BC_UIF_JOYSTICK_MASK (0x001f)
149 #define BC_UIF_JOYSTICK_DOWN (1 << 0)
150 #define BC_UIF_JOYSTICK_RIGHT (1 << 1)
151 #define BC_UIF_JOYSTICK_UP (1 << 2)
152 #define BC_UIF_JOYSTICK_LEFT (1 << 3)
153 #define BC_UIF_JOYSTICK_CENTER (1 << 4)
156 #define BC_UIF_AEM_BC (0)
157 #define BC_UIF_AEM_EFM (1)
160 #define BC_DISPLAY_CTRL_RESET (1 << 1)
161 #define BC_DISPLAY_CTRL_POWER_ENABLE (1 << 0)
162 #define BC_DISPLAY_CTRL_MODE_SHIFT 2
163 #define BC_DISPLAY_CTRL_MODE_8080 (0 << BC_DISPLAY_CTRL_MODE_SHIFT)
164 #define BC_DISPLAY_CTRL_MODE_GENERIC (1 << BC_DISPLAY_CTRL_MODE_SHIFT)
167 #define BC_EBI_CTRL_EXTADDR_MASK (0x0001)
170 #define BC_ARB_CTRL_SHIFT 0
171 #define BC_ARB_CTRL_BC (0 << BC_ARB_CTRL_SHIFT)
172 #define BC_ARB_CTRL_EBI (1 << BC_ARB_CTRL_SHIFT)
173 #define BC_ARB_CTRL_SPI (2 << BC_ARB_CTRL_SHIFT)
176 #define BC_INTEN_MASK (0x001f)
177 #define BC_INTEN_PB (1 << 0)
178 #define BC_INTEN_DIP (1 << 1)
179 #define BC_INTEN_JOYSTICK (1 << 2)
180 #define BC_INTEN_AEM (1 << 3)
181 #define BC_INTEN_ETH (1 << 4)
183 #define BC_INTFLAG_MASK (0x001f)
184 #define BC_INTFLAG_PB (1 << 0)
185 #define BC_INTFLAG_DIP (1 << 1)
186 #define BC_INTFLAG_JOYSTICK (1 << 2)
187 #define BC_INTFLAG_AEM (1 << 3)
188 #define BC_INTFLAG_ETH (1 << 4)
191 #define BC_PERICON_RS232_SHUTDOWN_SHIFT 13
192 #define BC_PERICON_RS232_UART_SHIFT 12
193 #define BC_PERICON_RS232_LEUART_SHIFT 11
194 #define BC_PERICON_I2C_SHIFT 10
195 #define BC_PERICON_I2S_ETH_SEL_SHIFT 9
196 #define BC_PERICON_I2S_ETH_SHIFT 8
197 #define BC_PERICON_TRACE_SHIFT 7
198 #define BC_PERICON_TOUCH_SHIFT 6
199 #define BC_PERICON_AUDIO_IN_SHIFT 5
200 #define BC_PERICON_AUDIO_OUT_SEL_SHIFT 4
201 #define BC_PERICON_AUDIO_OUT_SHIFT 3
202 #define BC_PERICON_ANALOG_DIFF_SHIFT 2
203 #define BC_PERICON_ANALOG_SE_SHIFT 1
204 #define BC_PERICON_SPI_SHIFT 0
207 #define BC_SPI_DEMUX_SLAVE_MASK (0x0003)
208 #define BC_SPI_DEMUX_SLAVE_AUDIO (0)
209 #define BC_SPI_DEMUX_SLAVE_ETHERNET (1)
210 #define BC_SPI_DEMUX_SLAVE_DISPLAY (2)
213 #define BC_ADC_STATUS_DONE (0)
214 #define BC_ADC_STATUS_BUSY (1)
217 #define BC_CLKRST_FLASH_SHIFT (1 << 1)
218 #define BC_CLKRST_ETH_SHIFT (1 << 2)
221 #define BC_HW_VERSION_PCB_MASK (0x07f0)
222 #define BC_HW_VERSION_PCB_SHIFT (4)
223 #define BC_HW_VERSION_BOARD_MASK (0x000f)
224 #define BC_HW_VERSION_BOARD_SHIFT (0)
227 #define BC_FW_VERSION_MAJOR_MASK (0xf000)
228 #define BC_FW_VERSION_MAJOR_SHIFT (12)
229 #define BC_FW_VERSION_MINOR_MASK (0x0f00)
230 #define BC_FW_VERSION_MINOR_SHIFT (8)
231 #define BC_FW_VERSION_PATCHLEVEL_MASK (0x00ff)
232 #define BC_FW_VERSION_PATCHLEVEL_SHIFT (0)
235 #define BC_MBOX_TXSTATUS0_FIFOEMPTY (1 << 0)
236 #define BC_MBOX_TXSTATUS0_FIFOFULL (1 << 1)
237 #define BC_MBOX_TXSTATUS0_FIFOUNDERFLOW (1 << 4)
238 #define BC_MBOX_TXSTATUS0_FIFOOVERFLOW (1 << 5)
240 #define BC_MBOX_TXSTATUS1_WORDCOUNT_MASK (0x07FF)
243 #define BC_BUF_CTRL_CS_ENABLE (1 << 0)
__IO uint16_t SCRATCH_BC0
__IO uint16_t SCRATCH_COMMON
__IO uint16_t SCRATCH_BC1
__IO uint16_t MBOX_TXSTATUS0
__IO uint16_t SCRATCH_EFM1
__IO uint16_t SCRATCH_BC2
__IO uint16_t SCRATCH_EFM3
__IO uint16_t MBOX_TXSTATUS1
__IO uint16_t BC_MBOX_TXCTRL
__IO uint16_t BC_MBOX_TXSTATUS1
__IO uint16_t SCRATCH_EFM0
__IO uint16_t MBOX_TXDATA
__IO uint16_t UIF_JOYSTICK
__IO uint16_t MBOX_TXCTRL
__IO uint16_t DISPLAY_CTRL
__IO uint16_t SCRATCH_EFM2
__IO uint16_t BC_MBOX_TXSTATUS0
__IO uint16_t BC_MBOX_TXDATA
__IO uint16_t SCRATCH_BC3