本帖最后由 往事啊 于 2018-6-11 22:14 编辑
#define OV7670_VSYNC HAL_GPIO_ReadPin(GPIOF,GPIO_PIN_8) //同步信号检测IO
#define OV7670_WRST(n) (n?HAL_GPIO_WritePin(GPIOF,GPIO_PIN_7,GPIO_PIN_SET):HAL_GPIO_WritePin(GPIOF,GPIO_PIN_7,GPIO_PIN_RESET)) //写指针复位
#define OV7670_WREN(n) (n?HAL_GPIO_WritePin(GPIOF,GPIO_PIN_6,GPIO_PIN_SET):HAL_GPIO_WritePin(GPIOF,GPIO_PIN_6,GPIO_PIN_RESET)) //写入FIFO使能
#define OV7670_RCK_H GPIOH->BSRR=1<<5 //设置读数据时钟高电平
#define OV7670_RCK_L GPIOH->BSRR=1<<21 //设置读数据时钟低电平
#define OV7670_RRST(n) (n?HAL_GPIO_WritePin(GPIOF,GPIO_PIN_9,GPIO_PIN_SET):HAL_GPIO_WritePin(GPIOF,GPIO_PIN_9,GPIO_PIN_RESET)) //读指针复位
#define OV7670_CS(n) (nHAL_GPIO_WritePin(GPIOH,GPIO_PIN_4,GPIO_PIN_SET):HAL_GPIO_WritePin(GPIOH,GPIO_PIN_4,GPIO_PIN_RESET)) //片选信号(OE)
#define OV7670_DATA (u8)((GPIOC->IDR&0x0030>>4)|((GPIOC->IDR&0x0400)>>4)|(GPIOB->IDR&0xe000)>>11|(GPIOG->IDR&0x1400)>>5)




上图是F7几个IO口我图像出来这样的
一周热门 更多>