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

Dependencies:   mbed ILI9341_SPI OV7670_SCCB

GPIOInit.h

Committer:
tmnt
Date:
2016-11-20
Revision:
7:2ed3ce710cc2
Parent:
5:541e2adc765d

File content as of revision 7:2ed3ce710cc2:

#include "mbed.h"

void gpio_Init(){
 GPIO_InitTypeDef gpioconf1; 
    __GPIOB_CLK_ENABLE();
     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
    gpioconf1.Mode = GPIO_MODE_INPUT;
    gpioconf1.Pull = GPIO_PULLDOWN;
    gpioconf1.Speed = GPIO_SPEED_HIGH; 
    HAL_GPIO_Init(GPIOB, &gpioconf1);
   
   
   HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_HSE, RCC_MCODIV_1); 
 
     GPIO_InitTypeDef GPIO_InitStruct; 
  /*Configure GPIO pin : PC9 MCO2 for cam XCLK*/    
  __GPIOC_CLK_ENABLE();    
  GPIO_InitStruct.Pin = GPIO_PIN_9;    
  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;    
  GPIO_InitStruct.Pull = GPIO_NOPULL;    
  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;    
  GPIO_InitStruct.Alternate = GPIO_AF0_MCO;    
  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  }