色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 9G-STM32 EWARM開發(fā)過(guò)程簡(jiǎn)介之四

          9G-STM32 EWARM開發(fā)過(guò)程簡(jiǎn)介之四

          作者: 時(shí)間:2016-11-29 來(lái)源:網(wǎng)絡(luò) 收藏

          六,定義API訪問(wèn)接口
          */
          void LCD_Reset(void)
          {
          GPIO_SetBits(GPIOC, GPIO_Pin_4);//置1 LCDRST = 1;
          OSTimeDlyHMSM(0, 0, 0, 10);
          GPIO_ResetBits(GPIOC, GPIO_Pin_4);//清0 LCDRST = 0;
          OSTimeDlyHMSM(0, 0, 0, 50);
          GPIO_SetBits(GPIOC, GPIO_Pin_4);//置1 LCDRST = 1;
          OSTimeDlyHMSM(0, 0, 0, 50);
          }

          void STM32_T6963C_Init(void)
          {
          unsigned int i;
          /* Configure the LCD Control pins --------------------------------------------*/
          LCD_CtrlLinesConfig();

          /* Configure the FSMC Parallel interface -------------------------------------*/
          LCD_FSMCConfig();

          /* initialize sequence -------------------------------*/
          LCD_Reset();

          本文引用地址:http://cafeforensic.com/article/201611/323210.htm

          WriteCMD2(0x00,0x08,0x42);//設(shè)置顯示圖形首地址
          WriteCMD2((FRAME_BUFFER_LENGTH/8),0x00,0x43);//設(shè)置圖形顯示區(qū)域?qū)挾?br /> WriteCMD0(0x98);//圖形顯示開
          WriteCMD0(0x88);//設(shè)定顯示方式,圖形/文本或的方式
          }

          void STM32_T6963C_Clear(void)
          {
          unsigned int i;

          WriteCMD2(0x00,0x00,0x24);
          WriteCMD0(0xb0);

          for(i=0;i<0x2000;i++)
          {
          WriteCMD1(0x00,0xc0);
          }
          WriteCMD0(0xb2);
          }

          //設(shè)定顯示地址函數(shù)
          static void LCD_Set_x_y(unsigned char x,unsigned char y,unsigned char mode)
          {
          unsigned int temp;

          temp=(FRAME_BUFFER_LENGTH/8)*y + x/8;
          if(mode==IMAGE)
          { //如果圖形模式要加上圖形區(qū)首地址0x0800
          temp+=0x0800;
          }
          WriteCMD2(temp&0xff,temp/256,0x24);
          }

          void LCD_Paint_dot(unsigned char x,unsigned char y)
          {
          LCD_Set_x_y(x,y,IMAGE);
          WriteCMD0(0xf8|(0x07&(~(x%8))));
          }
          void LCD_Clear_dot(unsigned char x,unsigned char y)
          {
          LCD_Set_x_y(x,y,IMAGE);
          WriteCMD0(0xf0|(0x07&(~(x%8))));
          }
          void LCD_Paint_line_x(unsigned char y) //圖形方式畫一條線
          {
          unsigned char i;

          LCD_Set_x_y(0,y,IMAGE);
          for(i=0;i<(VISION_PIXEL_LENGTH/8);i++)
          {
          WriteCMD1(0xFF, 0xc0); //數(shù)據(jù)寫地址不變
          }
          }

          void LCD_Paint_line_y(unsigned char x)
          {
          unsigned char i;

          for(i=0;i{
          LCD_Paint_dot(x,i);
          }
          }

          /*
          七,其它接口自行處理
          */


          上一頁(yè) 1 2 下一頁(yè)

          評(píng)論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉