См. документацию.
33 #ifndef BSP_BOARD_DEF_H
34 #define BSP_BOARD_DEF_H 1
49 #ifndef bsp_board_EA_v1_1
50 #define bsp_board_EA_v1_1 1
55 #define i_MCU_FAMILY LPC17xx
57 #define i_MCU_MODEL 1768
59 #define i_BOARD EA_v1_1
63 #define i_VERSION 0x010100
65 #define BSP_BOARD_HAS_ETHERNET 1
66 #define BSP_BOARD_HAS_UART0 1
67 #define BSP_BOARD_HAS_UART1 1
68 #define BSP_BOARD_HAS_UART2 1
69 #define BSP_BOARD_HAS_CAN 1
70 #define BSP_BOARD_HAS_USB 1
71 #define BSP_BOARD_HAS_USB_HOST 2
72 #define BSP_BOARD_HAS_USB_OTG 1
73 #define BSP_BOARD_HAS_USB_DEVICE 1
75 #define BSP_BOARD_HAS_SD 1
76 #define BSP_BOARD_HAS_MMC 1
78 #define BSP_BOARD_HAS_I2C 1
79 #define BSP_BOARD_HAS_I2C_PCA9532 1
81 #define BSP_BOARD_HAS_SPI 1
82 #define BSP_BOARD_HAS_SPI_TSC2046 1
85 #define LPC2xxx_VIC_SETUP 1
86 #define LPC2xxx_CLOCK_SETUP 1
87 #define LPC2xxx_PLL_SETUP 1
89 #define XTAL_HZ 12000000UL
97 #define CLKSRCSEL_Val CLKSRCSEL_XTAL
105 #define PLL_MValue 11
107 #define CCLKCFG_Val 3
108 #define USBCLKCFG_Val 5
133 #define PCLKSEL0_Val (LPC2XXX_PCLK_V(WDT,4) | LPC2XXX_PCLK_V(TIMER0,1))
137 #define PCLKSEL1_Val (LPC2XXX_PCLK_V(BAT_RAM,4) | LPC2XXX_PCLK_V(SYSCON,4))
141 #define PCONP_Val (PCTIMER0 | PCTIMER1 | PCUART0 | PCUART1 | \
142 PCPWM1 | PCI2C0 | PCSPI | PCRTC | PCSSP1 | PCGPIO | PCI2C1 \
143 PCTIM3 | PCI2C1 | PCUART3 | PCENET)
148 #define LPC2xxx_FLASH_SETUP 1
151 #define MAMCR_Val LPC_SC_MAM_MODE_FULL
154 #define LPC2xxx_SDRAM_SETUP BSP_BOARD_HAS_SDRAM
161 #define P0_20_TP_CS PORT_PIN_NUMBER(LPC2XXX_PORT0,20)
163 #define port_spi_chip_select_init() \
164 PORT_SELECT_PIN (P0_20_TP_CS,PORT_PIN_MODE_GPIO); \
165 PORT_DIRECTION_PIN(P0_20_TP_CS,PIN_OUTPUT); \
166 PORT_SET_PIN (P0_20_TP_CS)
170 #define port_spi_chip_select(chip_num) \
171 PORT_CLEAR_PIN (P0_20_TP_CS)
174 #define port_spi_chip_disselect(chip_num) \
175 PORT_SET_PIN (P0_20_TP_CS)