32 #ifndef BSP430_PLATFORM_TRXEB_PLATFORM_H
33 #define BSP430_PLATFORM_TRXEB_PLATFORM_H
61 #define BSP430_PLATFORM_TRXEB 1
67 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
68 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT1
69 #define BSP430_PLATFORM_BUTTON_LEFT_PORT_PERIPH_HANDLE BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE
70 #define BSP430_PLATFORM_BUTTON_LEFT_PORT_BIT BSP430_PLATFORM_BUTTON0_PORT_BIT
72 #define BSP430_PLATFORM_BUTTON1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
73 #define BSP430_PLATFORM_BUTTON1_PORT_BIT BIT2
74 #define BSP430_PLATFORM_BUTTON_RIGHT_PORT_PERIPH_HANDLE BSP430_PLATFORM_BUTTON1_PORT_PERIPH_HANDLE
75 #define BSP430_PLATFORM_BUTTON_RIGHT_PORT_BIT BSP430_PLATFORM_BUTTON1_PORT_BIT
77 #define BSP430_PLATFORM_BUTTON2_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
78 #define BSP430_PLATFORM_BUTTON2_PORT_BIT BIT3
79 #define BSP430_PLATFORM_BUTTON_SELECT_PORT_PERIPH_HANDLE BSP430_PLATFORM_BUTTON2_PORT_PERIPH_HANDLE
80 #define BSP430_PLATFORM_BUTTON_SELECT_PORT_BIT BSP430_PLATFORM_BUTTON2_PORT_BIT
82 #define BSP430_PLATFORM_BUTTON3_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
83 #define BSP430_PLATFORM_BUTTON3_PORT_BIT BIT4
84 #define BSP430_PLATFORM_BUTTON_UP_PORT_PERIPH_HANDLE BSP430_PLATFORM_BUTTON3_PORT_PERIPH_HANDLE
85 #define BSP430_PLATFORM_BUTTON_UP_PORT_BIT BSP430_PLATFORM_BUTTON3_PORT_BIT
87 #define BSP430_PLATFORM_BUTTON4_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
88 #define BSP430_PLATFORM_BUTTON4_PORT_BIT BIT5
89 #define BSP430_PLATFORM_BUTTON_DOWN_PORT_PERIPH_HANDLE BSP430_PLATFORM_BUTTON4_PORT_PERIPH_HANDLE
90 #define BSP430_PLATFORM_BUTTON_DOWN_PORT_BIT BSP430_PLATFORM_BUTTON4_PORT_BIT
93 #define BSP430_LED_RED 0
94 #define BSP430_LED_YELLOW 1
95 #define BSP430_LED_GREEN 2
96 #define BSP430_LED_RED1 3
99 #define BSP430_PMM_COREV_FOR_MCLK(mclk_) \
100 ((20000000UL < (mclk_)) ? PMMCOREV_3 : \
101 ((12000000UL < (mclk_)) ? PMMCOREV_2 : \
102 (((8000000UL < (mclk_)) ? PMMCOREV_1 : \
107 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
109 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 6
111 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
113 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
115 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
117 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT7
119 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
121 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT0
123 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
125 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT1
130 #if (configBSP430_RFEM - 0)
131 #define BSP430_RFEM 1
133 #if (BSP430_RFEM - 0)
134 #define BSP430_RFEM_SERIAL_PERIPH_HANDLE BSP430_PERIPH_USCI5_B0
135 #define BSP430_RFEM_RF1P3_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
136 #define BSP430_RFEM_RF1P3_PORT_BIT BIT4
137 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
138 #define BSP430_RFEM_RF1P3_TIMER_CCIDX 3
139 #define BSP430_RFEM_RF1P3_TIMER_CCIS CCIS_0
140 #define BSP430_RFEM_RF1P4_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
141 #define BSP430_RFEM_RF1P4_PORT_BIT BIT1
142 #define BSP430_RFEM_RF1P4_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
143 #define BSP430_RFEM_RF1P4_TIMER_CCIDX 0
144 #define BSP430_RFEM_RF1P4_TIMER_CCIS CCIS_0
145 #define BSP430_RFEM_RF1P5_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
146 #define BSP430_RFEM_RF1P5_PORT_BIT BIT2
147 #define BSP430_RFEM_RF1P5_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
148 #define BSP430_RFEM_RF1P5_TIMER_CCIDX 2
149 #define BSP430_RFEM_RF1P5_TIMER_CCIS CCIS_1
150 #define BSP430_RFEM_RF1P6_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
151 #define BSP430_RFEM_RF1P6_PORT_BIT BIT5
152 #define BSP430_RFEM_RF1P6_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
153 #define BSP430_RFEM_RF1P6_TIMER_CCIDX 4
154 #define BSP430_RFEM_RF1P6_TIMER_CCIS CCIS_0
155 #define BSP430_RFEM_RF1P7_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
156 #define BSP430_RFEM_RF1P7_PORT_BIT BIT4
157 #define BSP430_RFEM_RF1P9_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
158 #define BSP430_RFEM_RF1P9_PORT_BIT BIT5
159 #define BSP430_RFEM_RF1P10_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
160 #define BSP430_RFEM_RF1P10_PORT_BIT BIT7
161 #define BSP430_RFEM_RF1P11_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
162 #define BSP430_RFEM_RF1P11_PORT_BIT BIT3
163 #define BSP430_RFEM_RF1P11_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
164 #define BSP430_RFEM_RF1P11_TIMER_CCIDX 3
165 #define BSP430_RFEM_RF1P11_TIMER_CCIS CCIS_1
166 #define BSP430_RFEM_RF1P12_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
167 #define BSP430_RFEM_RF1P12_PORT_BIT BIT3
168 #define BSP430_RFEM_RF1P12_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
169 #define BSP430_RFEM_RF1P12_TIMER_CCIDX 2
170 #define BSP430_RFEM_RF1P12_TIMER_CCIS CCIS_0
171 #define BSP430_RFEM_RF1P14_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
172 #define BSP430_RFEM_RF1P14_PORT_BIT BIT0
173 #define BSP430_RFEM_RF1P15_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
174 #define BSP430_RFEM_RF1P15_PORT_BIT BIT4
175 #define BSP430_RFEM_RF1P15_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
176 #define BSP430_RFEM_RF1P15_TIMER_CCIDX 4
177 #define BSP430_RFEM_RF1P15_TIMER_CCIS CCIS_1
178 #define BSP430_RFEM_RF1P16_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
179 #define BSP430_RFEM_RF1P16_PORT_BIT BIT3
180 #define BSP430_RFEM_RF1P17_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
181 #define BSP430_RFEM_RF1P17_PORT_BIT BIT5
182 #define BSP430_RFEM_RF1P17_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
183 #define BSP430_RFEM_RF1P17_TIMER_CCIDX 0
184 #define BSP430_RFEM_RF1P17_TIMER_CCIS CCIS_1
185 #define BSP430_RFEM_RF1P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
186 #define BSP430_RFEM_RF1P18_PORT_BIT BIT1
187 #define BSP430_RFEM_RF1P20_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
188 #define BSP430_RFEM_RF1P20_PORT_BIT BIT2
189 #define BSP430_RFEM_RF2P15_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
190 #define BSP430_RFEM_RF2P15_PORT_BIT BIT0
191 #define BSP430_RFEM_RF2P15_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
192 #define BSP430_RFEM_RF2P15_TIMER_CCIDX 0
193 #define BSP430_RFEM_RF2P15_TIMER_CCIS CCIS_1
194 #define BSP430_RFEM_RF2P17_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
195 #define BSP430_RFEM_RF2P17_PORT_BIT BIT1
196 #define BSP430_RFEM_RF2P17_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
197 #define BSP430_RFEM_RF2P17_TIMER_CCIDX 1
198 #define BSP430_RFEM_RF2P17_TIMER_CCIS CCIS_1
199 #define BSP430_RFEM_RF2P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
200 #define BSP430_RFEM_RF2P18_PORT_BIT BIT2
201 #define BSP430_RFEM_RF2P18_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
202 #define BSP430_RFEM_RF2P18_TIMER_CCIDX 1
203 #define BSP430_RFEM_RF2P18_TIMER_CCIS CCIS_0
204 #define BSP430_RFEM_RF2P19_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
205 #define BSP430_RFEM_RF2P19_PORT_BIT BIT0
211 #define BSP430_UTILITY_U8GLIB (configBSP430_UTILITY_U8GLIB - 0)
215 #ifndef configBSP430_PLATFORM_TRXEB_ALS
224 #define configBSP430_PLATFORM_TRXEB_ALS 0
227 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_ALS - 0)
231 #define BSP430_PLATFORM_TRXEB_ALS_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT6
236 #define BSP430_PLATFORM_TRXEB_ALS_PWR_PORT_BIT BIT1
241 #define BSP430_PLATFORM_TRXEB_ALS_OUT_PORT_BIT BIT2
246 #define BSP430_PLATFORM_TRXEB_ALS_OUT_INCH ADC12INCH_2
249 #ifndef configBSP430_PLATFORM_TRXEB_ACCEL
257 #define configBSP430_PLATFORM_TRXEB_ACCEL 0
260 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_ACCEL - 0)
265 #define BSP430_PLATFORM_TRXEB_ACCEL_PWR_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT6
270 #define BSP430_PLATFORM_TRXEB_ACCEL_PWR_PORT_BIT BIT0
275 #define BSP430_PLATFORM_TRXEB_ACCEL_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
280 #define BSP430_PLATFORM_TRXEB_ACCEL_CSn_PORT_BIT BIT7
282 #ifndef configBSP430_PLATFORM_TRXEB_ACCEL_IRQ
288 #define configBSP430_PLATFORM_TRXEB_ACCEL_IRQ 0
291 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_ACCEL_IRQ - 0)
295 #define BSP430_PLATFORM_TRXEB_ACCEL_IRQ_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
300 #define BSP430_PLATFORM_TRXEB_ACCEL_IRQ_PORT_BIT BIT0
306 #ifndef configBSP430_PLATFORM_M25P
314 #define configBSP430_PLATFORM_M25P 0
317 #if (configBSP430_PLATFORM_M25P - 0)
320 #define BSP430_PLATFORM_M25P_SPI_PERIPH_HANDLE BSP430_PLATFORM_TRXEB_IO_SPI0_PERIPH_HANDLE
325 #define BSP430_PLATFORM_M25P_PWR_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT7
330 #define BSP430_PLATFORM_M25P_PWR_PORT_BIT BIT6
335 #define BSP430_PLATFORM_M25P_RSTn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT7
340 #define BSP430_PLATFORM_M25P_RSTn_PORT_BIT BIT2
345 #define BSP430_PLATFORM_M25P_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT8
350 #define BSP430_PLATFORM_M25P_CSn_PORT_BIT BIT6
353 #define BSP430_PLATFORM_M25P_SUPPORTS_PW 1
356 #define BSP430_PLATFORM_M25P_SUPPORTS_PE 1
359 #define BSP430_PLATFORM_M25P_SUPPORTS_SSE 1
362 #define BSP430_PLATFORM_M25P_SECTOR_SIZE 0x10000
365 #define BSP430_PLATFORM_M25P_SUBSECTOR_SIZE 0x1000
368 #define BSP430_PLATFORM_M25P_SECTOR_COUNT 4
372 #ifndef configBSP430_PLATFORM_TRXEB_LCD
390 #define configBSP430_PLATFORM_TRXEB_LCD 0
393 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_LCD - 0)
396 #define BSP430_PLATFORM_TRXEB_LCD_SPI_PERIPH_HANDLE BSP430_PLATFORM_TRXEB_IO_SPI0_PERIPH_HANDLE
401 #define BSP430_PLATFORM_TRXEB_LCD_PWR_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT7
406 #define BSP430_PLATFORM_TRXEB_LCD_PWR_PORT_BIT BIT7
411 #define BSP430_PLATFORM_TRXEB_LCD_RSTn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT7
416 #define BSP430_PLATFORM_TRXEB_LCD_RSTn_PORT_BIT BIT3
421 #define BSP430_PLATFORM_TRXEB_LCD_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT9
426 #define BSP430_PLATFORM_TRXEB_LCD_CSn_PORT_BIT BIT6
431 #define BSP430_PLATFORM_TRXEB_LCD_A0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT9
436 #define BSP430_PLATFORM_TRXEB_LCD_A0_PORT_BIT BIT7
439 #define BSP430_PLATFORM_TRXEB_LCD_COLUMNS 128
442 #define BSP430_PLATFORM_TRXEB_LCD_PAGES 8
445 #define BSP430_PLATFORM_TRXEB_LCD_ROWS_PER_PAGE 8
449 #ifndef configBSP430_PLATFORM_TRXEB_IO_SPI0
459 #define configBSP430_PLATFORM_TRXEB_IO_SPI0 ((configBSP430_PLATFORM_M25P - 0) || (configBSP430_PLATFORM_TRXEB_LCD - 0))
462 #ifndef configBSP430_PLATFORM_TRXEB_IO_SPI1
471 #define configBSP430_PLATFORM_TRXEB_IO_SPI1 (configBSP430_PLATFORM_TRXEB_ACCEL - 0)
474 #if (configBSP430_PLATFORM_TRXEB_ACCEL - 0)
476 #define BSP430_PLATFORM_TRXEB_ACCEL_SPI_PERIPH_HANDLE BSP430_PLATFORM_TRXEB_IO_SPI1_PERIPH_HANDLE
479 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_IO_SPI0 - 0)
484 #define BSP430_PLATFORM_TRXEB_IO_SPI0_PERIPH_HANDLE BSP430_PERIPH_USCI5_B2
487 #if defined(BSP430_DOXYGEN) || (configBSP430_PLATFORM_TRXEB_IO_SPI1 - 0)
492 #define BSP430_PLATFORM_TRXEB_IO_SPI1_PERIPH_HANDLE BSP430_PERIPH_USCI5_A2