Go to the documentation of this file.
54 #define BUTTONS_MB851A 1
58 #define BUTTONS_MB851B 1
62 #define BUTTONS_MB851C 1
66 #define BUTTONS_MB954A 1
70 #define BUTTONS_MB954B 1
74 #define BUTTONS_MB950A 5
78 #define BUTTONS_MB951A 1
143 #define BOARD_HAS_MEMS (1 << 0)
147 #define BOARD_HAS_TEMP_SENSOR (1 << 1)
151 #define BOARD_HAS_PA (1 << 2)
155 #define BOARD_HAS_EEPROM (1 << 3)
159 #define BOARD_HAS_FTDI (1 << 4)
163 #define BOARD_HAS_STM32F (1 << 5)
188 #define GPIO_PxCLR_BASE (GPIO_PACLR_ADDR)
189 #define GPIO_PxSET_BASE (GPIO_PASET_ADDR)
190 #define GPIO_PxOUT_BASE (GPIO_PAOUT_ADDR)
191 #define GPIO_PxIN_BASE (GPIO_PAIN_ADDR)
193 #define GPIO_Px_OFFSET (GPIO_PBCFGL_ADDR-GPIO_PACFGL_ADDR)
197 #define LED_D1 PORTx_PIN(boardDescription->io->leds[0].gpioPort, boardDescription->io->leds[0].gpioPin) //PORTB_PIN(6)
198 #define LED_D3 PORTx_PIN(boardDescription->io->leds[1].gpioPort, boardDescription->io->leds[1].gpioPin) // PORTB_PIN(5)
199 #define DUMMY_LED 0xff
203 #define BUTTON_Sn(n) (PORTx_PIN(boardDescription->io->buttons[n].gpioPort, boardDescription->io->buttons[n].gpioPin))
204 #define BUTTON_Sn_WAKE_SOURCE(n) (1 << ((boardDescription->io->buttons[n].gpioPin) + (8 * (boardDescription->io->buttons[n].gpioPort >> 3))))
205 #define BUTTON_INPUT_GPIO(port) *((volatile int32u *) (GPIO_PxIN_BASE + GPIO_Px_OFFSET * port))
206 #define DUMMY_BUTTON 0xff
208 #define BUTTON_S1 (boardDescription->buttons>0 ? BUTTON_Sn(0): DUMMY_BUTTON)
209 #define BUTTON_S2 (boardDescription->buttons>1 ? BUTTON_Sn(1): DUMMY_BUTTON)
210 #define BUTTON_S3 (boardDescription->buttons>2 ? BUTTON_Sn(2): DUMMY_BUTTON)
211 #define BUTTON_S4 (boardDescription->buttons>3 ? BUTTON_Sn(3): DUMMY_BUTTON)
212 #define BUTTON_S5 (boardDescription->buttons>4 ? BUTTON_Sn(4): DUMMY_BUTTON)
214 #define BUTTON_S1_WAKE_SOURCE (boardDescription->buttons>0 ? BUTTON_Sn_WAKE_SOURCE(0): 0)
215 #define BUTTON_S2_WAKE_SOURCE (boardDescription->buttons>1 ? BUTTON_Sn_WAKE_SOURCE(1): 0)
216 #define BUTTON_S3_WAKE_SOURCE (boardDescription->buttons>2 ? BUTTON_Sn_WAKE_SOURCE(2): 0)
217 #define BUTTON_S4_WAKE_SOURCE (boardDescription->buttons>3 ? BUTTON_Sn_WAKE_SOURCE(3): 0)
218 #define BUTTON_S5_WAKE_SOURCE (boardDescription->buttons>4 ? BUTTON_Sn_WAKE_SOURCE(4): 0)
221 #define UART_TX PORTB_PIN(1)
222 #define UART_RX PORTB_PIN(2)
223 #define UART_RX_WAKE_SOURCE 0x00000400
226 #define TEMPERATURE_SENSOR_GPIO PORTx_PIN(boardDescription->temperatureSensor->gpioPort, boardDescription->temperatureSensor->gpioPin) // PORTB_PIN(7)