См. документацию.
33 #ifndef BSP_BOARD_DEF_H
34 #define BSP_BOARD_DEF_H 1
50 #ifndef bsp_board_EA_v1_1
51 #define bsp_board_EA_v1_1 1
56 #define i_MCU_FAMILY LPC2xxx
58 #define i_MCU_MODEL 2478
60 #define i_BOARD EA_v1_1
64 #define i_VERSION 0x010100
66 #define BSP_BOARD_HAS_ETHERNET 1
67 #define BSP_BOARD_HAS_UART0 1
68 #define BSP_BOARD_HAS_UART1 1
69 #define BSP_BOARD_HAS_UART2 1
70 #define BSP_BOARD_HAS_CAN 1
71 #define BSP_BOARD_HAS_USB 1
72 #define BSP_BOARD_HAS_USB_HOST 2
73 #define BSP_BOARD_HAS_USB_OTG 1
74 #define BSP_BOARD_HAS_USB_DEVICE 0
75 #ifndef BSP_USB_MODE_DEFINED
84 #define BSP_USB_MODE_DEFINED (\
85 TYPE_OTG_PORT1|TYPE_USB_PORT1_LED| \
86 TYPE_HOST_PORT2|TYPE_USB_PORT2_LED|TYPE_HOST_PORT2_POWER_EN)
89 #define BSP_BOARD_HAS_SD 1
90 #define BSP_BOARD_HAS_MMC 1
92 #define BSP_BOARD_HAS_I2C 1
93 #define BSP_BOARD_HAS_I2C_PCA9532 1
95 #define BSP_BOARD_HAS_SPI 1
96 #define BSP_BOARD_HAS_SPI_TSC2046 1
99 #define LPC2xxx_VIC_SETUP 1
100 #define LPC2xxx_CLOCK_SETUP 1
101 #define LPC2xxx_PLL_SETUP 1
103 #define XTAL_HZ 12000000UL
111 #define CLKSRCSEL_Val CLKSRCSEL_XTAL
119 #define PLL_MValue 11
121 #define CCLKCFG_Val 3
122 #define USBCLKCFG_Val 5
147 #define PCLKSEL0_Val (LPC2XXX_PCLK_V(WDT,4) | LPC2XXX_PCLK_V(TIMER0,1))
151 #define PCLKSEL1_Val (LPC2XXX_PCLK_V(BAT_RAM,4) | LPC2XXX_PCLK_V(SYSCON,4))
155 #define PCONP_Val (PCTIMER0 | PCTIMER1 | PCUART0 | PCUART1 | \
156 PCPWM1 | PCI2C0 | PCSPI | PCRTC | PCSSP1 | PCGPIO | PCI2C1 |\
157 PCTIMER3 | PCI2C1 | PCUART3 | PCENET)
160 #define LPC2xxx_FLASH_SETUP 1
163 #define MAMCR_Val LPC_SC_MAM_MODE_FULL
166 #define LPC2xxx_SDRAM_SETUP BSP_BOARD_HAS_SDRAM
173 #define P0_20_TP_CS PORT_PIN_NUMBER(LPC2XXX_PORT0,20)
175 #define port_spi_chip_select_init() \
176 PORT_SELECT_PIN (P0_20_TP_CS,PORT_PIN_MODE_GPIO); \
177 PORT_DIRECTION_PIN(P0_20_TP_CS,PIN_OUTPUT); \
178 PORT_SET_PIN (P0_20_TP_CS)
182 #define port_spi_chip_select(chip_num) \
183 PORT_CLEAR_PIN (P0_20_TP_CS)
186 #define port_spi_chip_disselect(chip_num) \
187 PORT_SET_PIN (P0_20_TP_CS)