EFR32 Mighty Gecko 13 Software Documentation  efr32mg13-doc-5.1.2
bsp_dk_bcreg_3200.h
Go to the documentation of this file.
1 /**************************************************************************/
18 #ifndef __BSP_DK_BCREG_3200_H
19 #define __BSP_DK_BCREG_3200_H
20 
21 #include <stdint.h>
22 
23 /***************************************************************************/
28 /***************************************************************************/
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /**************************************************************************/
41 #define BC_FLASH_BASE 0x80000000
42 #define BC_SRAM_BASE 0x84000000
43 #define BC_SSD2119_BASE 0x88000000
44 #define BC_REGISTER_BASE 0x8c000000
46 #define BC_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x00))
47 #define BC_EM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x01))
48 #define BC_MAGIC ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x02))
49 #define BC_LED ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x03))
50 #define BC_PUSHBUTTON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x04))
51 #define BC_DIPSWITCH ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x05))
52 #define BC_JOYSTICK ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x06))
53 #define BC_AEM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x07))
54 #define BC_DISPLAY_CTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x08))
55 #define BC_EBI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x09))
56 #define BC_BUS_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0a))
57 #define BC_PERCTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0c))
58 #define BC_AEMSTATE ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0d))
59 #define BC_SPI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0e))
60 #define BC_RESET ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0f))
61 #define BC_ADC_START ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x10))
62 #define BC_ADC_STATUS ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x11))
63 #define BC_ADC_DATA ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x12))
64 #define BC_HW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x14))
65 #define BC_FW_BUILDNO ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x15))
66 #define BC_FW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x16))
67 #define BC_SCRATCH_COMMON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x17))
68 #define BC_SCRATCH_EFM0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x18))
69 #define BC_SCRATCH_EFM1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x19))
70 #define BC_SCRATCH_EFM2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1A))
71 #define BC_SCRATCH_EFM3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1B))
72 #define BC_SCRATCH_BC0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1C))
73 #define BC_SCRATCH_BC1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1D))
74 #define BC_SCRATCH_BC2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1E))
75 #define BC_SCRATCH_BC3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1f))
76 #define BC_INTFLAG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x20))
77 #define BC_INTEN ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x21))
79 /**************************************************************************/
83 #define BC_CFG_SPI (0)
84 #define BC_CFG_EBI (1)
86 #define BC_EM_EM0 (0)
87 #define BC_EM_EM1 (1)
88 #define BC_EM_EM2 (2)
89 #define BC_EM_EM3 (3)
90 #define BC_EM_EM4 (4)
92 #define BC_MAGIC_VALUE (0xef32)
94 #define BC_PUSHBUTTON_MASK (0x000f)
95 #define BC_PUSHBUTTON_SW1 (1 << 0)
96 #define BC_PUSHBUTTON_SW2 (1 << 1)
97 #define BC_PUSHBUTTON_SW3 (1 << 2)
98 #define BC_PUSHBUTTON_SW4 (1 << 3)
100 #define BC_DIPSWITCH_MASK (0x00ff)
102 #define BC_JOYSTICK_MASK (0x001f)
103 #define BC_JOYSTICK_DOWN (1 << 0)
104 #define BC_JOYSTICK_RIGHT (1 << 1)
105 #define BC_JOYSTICK_UP (1 << 2)
106 #define BC_JOYSTICK_LEFT (1 << 3)
107 #define BC_JOYSTICK_CENTER (1 << 4)
109 #define BC_DISPCTRL_RESET (1 << 0)
110 #define BC_DISPCTRL_POWER_ENABLE (1 << 1)
112 #define BC_EBI_CFG_MASK (0x0003)
113 #define BC_EBI_CFG_16X16 (0)
114 #define BC_EBI_CFG_8X8 (1)
115 #define BC_EBI_CFG_24X8 (2)
117 #define BC_BUS_CFG_MASK (0x0003)
118 #define BC_BUS_CFG_FSMC (0)
119 #define BC_BUS_CFG_EBI (1)
120 #define BC_BUS_CFG_SPI (2)
122 #define BC_PERCTRL_ACCEL (1 << 0)
123 #define BC_PERCTRL_AMBIENT (1 << 1)
124 #define BC_PERCTRL_POTMETER (1 << 2)
125 #define BC_PERCTRL_RS232A (1 << 3)
126 #define BC_PERCTRL_RS232B (1 << 4)
127 #define BC_PERCTRL_SPI (1 << 5)
128 #define BC_PERCTRL_I2C (1 << 6)
129 #define BC_PERCTRL_IRDA (1 << 7)
130 #define BC_PERCTRL_ANALOG_SE (1 << 8)
131 #define BC_PERCTRL_ANALOG_DIFF (1 << 9)
132 #define BC_PERCTRL_AUDIO_OUT (1 << 10)
133 #define BC_PERCTRL_AUDIO_IN (1 << 11)
134 #define BC_PERCTRL_ACCEL_GSEL (1 << 12)
135 #define BC_PERCTRL_ACCEL_SELFTEST (1 << 13)
136 #define BC_PERCTRL_RS232_SHUTDOWN (1 << 14)
137 #define BC_PERCTRL_IRDA_SHUTDOWN (1 << 15)
139 #define BC_AEMSTATE_BC (0)
140 #define BC_AEMSTATE_EFM (1)
142 #define BC_SPI_CFG_FLASH (0)
143 #define BC_SPI_CFG_MICROSD (1)
145 #define BC_RESET_FLASH (1 << 0)
146 #define BC_RESET_EFM (1 << 1)
148 #define BC_ADC_START_MASK (0x00ff)
150 #define BC_ADC_STATUS_DONE (0)
151 #define BC_ADC_STATUS_BUSY (1)
153 #define BC_HW_VERSION_PCB_MASK (0x07f0)
154 #define BC_HW_VERSION_PCB_SHIFT (4)
155 #define BC_HW_VERSION_BOARD_MASK (0x000f)
156 #define BC_HW_VERSION_BOARD_SHIFT (0)
158 #define BC_HW_FW_VERSION_MAJOR_MASK (0xf000)
159 #define BC_HW_FW_VERSION_MAJOR_SHIFT (12)
160 #define BC_HW_FW_VERSION_MINOR_MASK (0x0f00)
161 #define BC_HW_FW_VERSION_MINOR_SHIFT (8)
162 #define BC_HW_FW_VERSION_PATCHLEVEL_MASK (0x00ff)
163 #define BC_HW_FW_VERSION_PATCHLEVEL_SHIFT (0)
165 #define BC_INTEN_MASK (0x000f)
166 #define BC_INTEN_PB (1 << 0)
167 #define BC_INTEN_DIP (1 << 1)
168 #define BC_INTEN_JOYSTICK (1 << 2)
169 #define BC_INTEN_AEM (1 << 3)
171 #define BC_INTFLAG_MASK (0x000f)
172 #define BC_INTFLAG_PB (1 << 0)
173 #define BC_INTFLAG_DIP (1 << 1)
174 #define BC_INTFLAG_JOYSTICK (1 << 2)
175 #define BC_INTFLAG_AEM (1 << 3)
177 #ifdef __cplusplus
178 }
179 #endif
180 
184 #endif /* __BSP_DK_BCREG_3200_H */