Added USB example for stm32f4.
Moved clock enable for OTG_FS back into applications. This and gpio config are the only differences between f107 and f2xx/f4xx.
This commit is contained in:
@@ -291,6 +291,7 @@ int main(void)
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
|
||||
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_SPI2EN);
|
||||
rcc_peripheral_enable_clock(&RCC_AHBENR, RCC_AHBENR_OTGFSEN);
|
||||
|
||||
/* Configure SPI2: PB13(SCK), PB14(MISO), PB15(MOSI). */
|
||||
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_10_MHZ,
|
||||
|
||||
Reference in New Issue
Block a user