It's nucleo f4 DMA trandfer for ov7670&ILI9341.

Dependencies:   mbed ILI9341_SPI OV7670_SCCB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GPIOInit.h Source File

GPIOInit.h

00001 #include "mbed.h"
00002 
00003 void gpio_Init(){
00004  GPIO_InitTypeDef gpioconf1; 
00005     __GPIOB_CLK_ENABLE();
00006      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
00007     gpioconf1.Mode = GPIO_MODE_INPUT;
00008     gpioconf1.Pull = GPIO_PULLDOWN;
00009     gpioconf1.Speed = GPIO_SPEED_HIGH; 
00010     HAL_GPIO_Init(GPIOB, &gpioconf1);
00011    
00012    
00013    HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_HSE, RCC_MCODIV_1); 
00014  
00015      GPIO_InitTypeDef GPIO_InitStruct; 
00016   /*Configure GPIO pin : PC9 MCO2 for cam XCLK*/    
00017   __GPIOC_CLK_ENABLE();    
00018   GPIO_InitStruct.Pin = GPIO_PIN_9;    
00019   GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;    
00020   GPIO_InitStruct.Pull = GPIO_NOPULL;    
00021   GPIO_InitStruct.Speed = GPIO_SPEED_LOW;    
00022   GPIO_InitStruct.Alternate = GPIO_AF0_MCO;    
00023   HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
00024   }