SSD1963初始化.docVIP

  • 99
  • 0
  • 约2.53万字
  • 约 34页
  • 2016-11-21 发布于河南
  • 举报
SSD1963初始化

SSD1963初始化 /************************************************************** ** mili开发板 ** LCD驱动代码 ** 版本:V1.0 ** 论坛: ** 淘宝:/ ** 技术支持群:105339839 ***************************************************************/ /* Includes ------------------------------------------------------------------*/ #include stm32f10x.h #include hardware.h #include ili932x.h #include font.h #include math.h unsigned int HDP=479; unsigned int HT=531; unsigned int HPS=43; unsigned int LPS=8; unsigned char HPW=10; unsigned int VDP=271; unsigned int VT=288; unsigned int VPS=12; unsigned int FPS=4; unsigned char VPW=10; u32 POINT_COLOR = BLUE,BACK_COLOR = WHITE; /* 分别设置点的颜色和底色 */ /******************************************* * 函数名:LCD_GPIO_Config * 描述 :根据FSMC配置LCD的I/O *********************************************/ void LCD_GPIO_Config(void) { GPIO_InitTypeDef GPIO_InitStructure; /* 使能FSMC时钟*/ RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE); /* 使能FSMC对应相应管脚时钟 D E */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOE,ENABLE); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; /* 配置LCD背光控制管脚*/ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; GPIO_Init(GPIOC, GPIO_InitStructure); /* 配置FSMC相对应的数据线,FSMC-D0~D15: PD 14 15 0 1,PE 7 8 9 10 11 12 13 14 15,PD 8 9 10*/ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_14 | GPIO_Pin_15; GPIO_Init(GPIOD, GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15; GPIO_Init(GPIOE, GPIO_InitStructure);

文档评论(0)

1亿VIP精品文档

相关文档