It's nucleo f4 DMA trandfer for ov7670&ILI9341.
Dependencies: mbed ILI9341_SPI OV7670_SCCB
GPIOInit.h@5:541e2adc765d, 2016-04-29 (annotated)
- Committer:
- tmnt
- Date:
- Fri Apr 29 13:39:26 2016 +0000
- Revision:
- 5:541e2adc765d
Simplification of the program.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tmnt | 5:541e2adc765d | 1 | #include "mbed.h" |
tmnt | 5:541e2adc765d | 2 | |
tmnt | 5:541e2adc765d | 3 | void gpio_Init(){ |
tmnt | 5:541e2adc765d | 4 | GPIO_InitTypeDef gpioconf1; |
tmnt | 5:541e2adc765d | 5 | __GPIOB_CLK_ENABLE(); |
tmnt | 5:541e2adc765d | 6 | gpioconf1.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 |GPIO_PIN_14 | GPIO_PIN_15;//pa13 |
tmnt | 5:541e2adc765d | 7 | gpioconf1.Mode = GPIO_MODE_INPUT; |
tmnt | 5:541e2adc765d | 8 | gpioconf1.Pull = GPIO_PULLDOWN; |
tmnt | 5:541e2adc765d | 9 | gpioconf1.Speed = GPIO_SPEED_HIGH; |
tmnt | 5:541e2adc765d | 10 | HAL_GPIO_Init(GPIOB, &gpioconf1); |
tmnt | 5:541e2adc765d | 11 | |
tmnt | 5:541e2adc765d | 12 | |
tmnt | 5:541e2adc765d | 13 | HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_HSE, RCC_MCODIV_1); |
tmnt | 5:541e2adc765d | 14 | |
tmnt | 5:541e2adc765d | 15 | GPIO_InitTypeDef GPIO_InitStruct; |
tmnt | 5:541e2adc765d | 16 | /*Configure GPIO pin : PC9 MCO2 for cam XCLK*/ |
tmnt | 5:541e2adc765d | 17 | __GPIOC_CLK_ENABLE(); |
tmnt | 5:541e2adc765d | 18 | GPIO_InitStruct.Pin = GPIO_PIN_9; |
tmnt | 5:541e2adc765d | 19 | GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; |
tmnt | 5:541e2adc765d | 20 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
tmnt | 5:541e2adc765d | 21 | GPIO_InitStruct.Speed = GPIO_SPEED_LOW; |
tmnt | 5:541e2adc765d | 22 | GPIO_InitStruct.Alternate = GPIO_AF0_MCO; |
tmnt | 5:541e2adc765d | 23 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
tmnt | 5:541e2adc765d | 24 | } |