亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? stm3210c_eval_lcd.c

?? stm32+ucos-ii
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
{
  Ascii -= 32;
  LCD_DrawChar(Line, Column, &LCD_Currentfonts->table[Ascii * LCD_Currentfonts->Height]);
}


/**
  * @brief  Displays a maximum of 20 char on the LCD.
  * @param  Line: the Line where to display the character shape .
  *   This parameter can be one of the following values:
  *     @arg Linex: where x can be 0..9
  * @param  *ptr: pointer to string to display on LCD.
  * @retval None
  */
void LCD_DisplayStringLine(uint8_t Line, uint8_t *ptr)
{
  uint16_t refcolumn = 0;

  /* Send the string character by character on lCD */
  //while ((*ptr != 0) & (((refcolumn + 1) & 0xFFFF) <= LCD_Currentfonts->Width))
  while ((*ptr != 0))
  {
    /* Display one character on LCD */
    LCD_DisplayChar(Line, refcolumn, *ptr);
    /* Decrement the column position by 16 */
    refcolumn += LCD_Currentfonts->Width;
    if(refcolumn + LCD_Currentfonts->Width > LCD_PIXEL_WIDTH)
        break;
    /* Point on the next character */
    ptr++;
  }
}

void LCD_DisplayWelcomeStr(uint8_t Line)
{
  uint16_t num = 0;

  /* Send the string character by character on LCD */
  for(num=0; num<13; num++)
  {
    /* Display one China character on LCD */
    LCD_DrawChinaChar(Line, num*24+4, (uint8_t *)WelcomeStr[num]);
  }
}


/**
  * @brief  Sets a display window
  * @param  Xpos: specifies the X buttom left position.
  * @param  Ypos: specifies the Y buttom left position.
  * @param  Height: display window height.
  * @param  Width: display window width.
  * @retval None
  */
void LCD_SetDisplayWindow(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
{ 
#if 0 
  /* Horizontal GRAM Start Address */
  if(Xpos >= Height)
  {
    LCD_WriteReg(LCD_REG_80, (Xpos - Height + 1));
  }
  else
  {
    LCD_WriteReg(LCD_REG_80, 0);
  }
  /* Horizontal GRAM End Address */
  LCD_WriteReg(LCD_REG_81, Xpos);
  /* Vertical GRAM Start Address */
  if(Ypos >= Width)
  {
    LCD_WriteReg(LCD_REG_82, (Ypos - Width + 1));
  }  
  else
  {
    LCD_WriteReg(LCD_REG_82, 0);
  }
  /* Vertical GRAM End Address */
  LCD_WriteReg(LCD_REG_83, Ypos);
  LCD_SetCursor(Xpos, Ypos);
#endif
}


/**
  * @brief  Disables LCD Window mode.
  * @param  None
  * @retval None
  */
void LCD_WindowModeDisable(void)
{
#if 0
  LCD_SetDisplayWindow(239, 0x13F, 240, 320);
  LCD_WriteReg(LCD_REG_3, 0x1018);    
#endif
}


/**
  * @brief  Displays a line.
  * @param  Xpos: specifies the X position.
  * @param  Ypos: specifies the Y position.
  * @param  Length: line length.
  * @param  Direction: line direction.
  *   This parameter can be one of the following values: Vertical or Horizontal.
  * @retval None
  */
void LCD_DrawLine(uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
{
  uint32_t i = 0;
  
  LCD_SetCursor(Xpos, Ypos);
  if(Direction == LCD_DIR_HORIZONTAL)
  { 
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    for(i = 0; i < Length; i++)
    {
      LCD_WriteRAM(TextColor);
    }
  }
  else
  {
    for(i = 0; i < Length; i++)
    {
      LCD_WriteRAMWord(TextColor);
      Xpos++;
      LCD_SetCursor(Xpos, Ypos);
    }
  }
  SetCs
}

/**
  * @brief  Displays a Point.
  * @param  Color: specifies the Color.
  * @retval None
  */
void LCD_SetPoint(uint8_t Xpos, uint16_t Ypos, uint16_t Color)
{ 
  LCD_SetCursor(Xpos, Ypos);
  LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
  LCD_WriteRAM(Color);
  SetCs
}


/**
  * @brief  Displays a rectangle.
  * @param  Xpos: specifies the X position.
  * @param  Ypos: specifies the Y position.
  * @param  Height: display rectangle height.
  * @param  Width: display rectangle width.
  * @retval None
  */
void LCD_DrawRect(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
{
  LCD_DrawLine(Xpos, Ypos, Width, LCD_DIR_HORIZONTAL);
  LCD_DrawLine((Xpos + Height), Ypos, Width, LCD_DIR_HORIZONTAL);
  
  LCD_DrawLine(Xpos, Ypos, Height, LCD_DIR_VERTICAL);
  LCD_DrawLine(Xpos, (Ypos - Width + 1), Height, LCD_DIR_VERTICAL);
}


/**
  * @brief  Displays a circle.
  * @param  Xpos: specifies the X position.
  * @param  Ypos: specifies the Y position.
  * @param  Radius
  * @retval None
  */
void LCD_DrawCircle(uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
{
  s32  D;/* Decision Variable */ 
  uint32_t  CurX;/* Current X Value */
  uint32_t  CurY;/* Current Y Value */ 
  
  D = 3 - (Radius << 1);
  CurX = 0;
  CurY = Radius;
  
  while (CurX <= CurY)
  {
    LCD_SetCursor(Xpos + CurX, Ypos + CurY);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos + CurX, Ypos - CurY);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos - CurX, Ypos + CurY);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos - CurX, Ypos - CurY);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos + CurY, Ypos + CurX);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos + CurY, Ypos - CurX);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos - CurY, Ypos + CurX);
    LCD_WriteRAMWord(TextColor);
    LCD_SetCursor(Xpos - CurY, Ypos - CurX);
    LCD_WriteRAMWord(TextColor);
    if (D < 0)
    { 
      D += (CurX << 2) + 6;
    }
    else
    {
      D += ((CurX - CurY) << 2) + 10;
      CurY--;
    }
    CurX++;
  }
}

/**
  * @brief  Displays a monocolor picture.
  * @param  Pict: pointer to the picture array.
  * @retval None
  */
void LCD_DrawMonoPict(const uint32_t *Pict)
{
  uint32_t index = 0, i = 0;
  LCD_SetCursor(0, (LCD_PIXEL_WIDTH - 1)); 
  LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
  for(index = 0; index < 2400; index++)
  {
    for(i = 0; i < 32; i++)
    {
      if((Pict[index] & (1 << i)) == 0x00)
      {
        LCD_WriteRAM(BackColor);
      }
      else
      {
        LCD_WriteRAM(TextColor);
      }
    }
  }
 SetCs;
}

#ifdef USE_LCD_DrawBMP
/**
  * @brief  Displays a bitmap picture loaded in the SPI Flash.
  * @param  BmpAddress: Bmp picture address in the SPI Flash.
  * @retval None
  */
//void LCD_DrawBMP(uint32_t BmpAddress)
//{
//  uint32_t i = 0, size = 0;
//
//  /* Read bitmap size */
//  SPI_FLASH_BufferRead((uint8_t*)&size, BmpAddress + 2, 4);
//
//  /* get bitmap data address offset */
//  SPI_FLASH_BufferRead((uint8_t*)&i, BmpAddress + 10, 4);
//  
//  size = (size - i)/2;
//
//  SPI_FLASH_StartReadSequence(BmpAddress + i);
//
//  /* Disable SPI1  */
//  SPI_Cmd(SPI1, DISABLE);
//  /* SPI in 16-bit mode */
//  SPI_DataSizeConfig(SPI1, SPI_DataSize_16b);
//
//  /* Enable SPI1  */
//  SPI_Cmd(SPI1, ENABLE);
//  
//  /* Set GRAM write direction and BGR = 1 */
//  /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
//  /* AM=1 (address is updated in vertical writing direction) */
//  LCD_WriteReg(LCD_REG_3, 0x1008);
//
//  LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
//
//  /* Read bitmap data from SPI Flash and send them to LCD */
//  for(i = 0; i < size; i++)
//  {
//    LCD_WriteRAM(__REV_HalfWord(SPI_FLASH_SendHalfWord(0xA5A5)));
//  }
//
//  LCD_CtrlLinesWrite(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, Bit_SET);
//
//  /* Deselect the FLASH: Chip Select high */
//  SPI_FLASH_CS_HIGH();
//
//  /* Disable SPI1  */
//  SPI_Cmd(SPI1, DISABLE);
//  /* SPI in 8-bit mode */
//  SPI_DataSizeConfig(SPI1, SPI_DataSize_8b);
//
//  /* Enable SPI1  */
//  SPI_Cmd(SPI1, ENABLE);
//
//  /* Set GRAM write direction and BGR = 1 */
//  /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
//  /* AM = 1 (address is updated in vertical writing direction) */
//  LCD_WriteReg(LCD_REG_3, 0x1018);
//}


/**
  * @brief  Displays a bitmap picture loaded in the SPI Flash.
  * @param  BmpAddress: Bmp picture address in the SPI Flash.
  * @retval None
  */
void LCD_DrawBMP(const uint16_t *BmpAddress)
{
  uint32_t i = 0, size = 0;
  /* Read bitmap size */
  size = BmpAddress[1] | (BmpAddress[2] << 16);
  /* get bitmap data address offset */
  i = BmpAddress[5] | (BmpAddress[6] << 16);
  size = (size - i)/2;
  BmpAddress += i/2;
  /* Set GRAM write direction and BGR = 1 */
  /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
  /* AM=1 (address is updated in vertical writing direction) */
  LCD_WriteReg(LCD_REG_3, 0x1008);
  LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
  /* Read bitmap data from SPI Flash and send them to LCD */
  for(i = 0; i < size; i++)
  {
    LCD_WriteRAM(BmpAddress[i]);
  }
  LCD_CtrlLinesWrite(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, Bit_SET);
  /* Set GRAM write direction and BGR = 1 */
  /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
  /* AM = 1 (address is updated in vertical writing direction) */
  LCD_WriteReg(LCD_REG_3, 0x1018);
}
#endif

/**
  * @brief  Displays a full rectangle.
  * @param  Xpos: specifies the X position.
  * @param  Ypos: specifies the Y position.
  * @param  Height: rectangle height.
  * @param  Width: rectangle width.
  * @retval None
  */
void LCD_DrawFullRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
{
  LCD_SetTextColor(TextColor);

  LCD_DrawLine(Xpos, Ypos, Width, LCD_DIR_HORIZONTAL);
  LCD_DrawLine((Xpos + Height), Ypos, Width, LCD_DIR_HORIZONTAL);
  
  LCD_DrawLine(Xpos, Ypos, Height, LCD_DIR_VERTICAL);
  LCD_DrawLine(Xpos, (Ypos - Width + 1), Height, LCD_DIR_VERTICAL);

  Width -= 2;
  Height--;
  Ypos--;

  LCD_SetTextColor(BackColor);

  while(Height--)
  {
    LCD_DrawLine(++Xpos, Ypos, Width, LCD_DIR_HORIZONTAL);    
  }

  LCD_SetTextColor(TextColor);
}

/**
  * @brief  Displays a full circle.
  * @param  Xpos: specifies the X position.
  * @param  Ypos: specifies the Y position.
  * @param  Radius
  * @retval None
  */
void LCD_DrawFullCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
{
  int32_t  D;    /* Decision Variable */ 
  uint32_t  CurX;/* Current X Value */
  uint32_t  CurY;/* Current Y Value */ 
  
  D = 3 - (Radius << 1);

  CurX = 0;
  CurY = Radius;
  
  LCD_SetTextColor(BackColor);

  while (CurX <= CurY)
  {
    if(CurY > 0) 
    {
      LCD_DrawLine(Xpos - CurX, Ypos + CurY, 2*CurY, LCD_DIR_HORIZONTAL);
      LCD_DrawLine(Xpos + CurX, Ypos + CurY, 2*CurY, LCD_DIR_HORIZONTAL);
    }

    if(CurX > 0) 
    {
      LCD_DrawLine(Xpos - CurY, Ypos + CurX, 2*CurX, LCD_DIR_HORIZONTAL);
      LCD_DrawLine(Xpos + CurY, Ypos + CurX, 2*CurX, LCD_DIR_HORIZONTAL);
    }
    if (D < 0)
    { 
      D += (CurX << 2) + 6;
    }
    else
    {
      D += ((CurX - CurY) << 2) + 10;
      CurY--;
    }
    CurX++;
  }

  LCD_SetTextColor(TextColor);
  LCD_DrawCircle(Xpos, Ypos, Radius);
}

/**
  * @brief  Displays an uni line (between two points).
  * @param  x1: specifies the point 1 x position.
  * @param  y1: specifies the point 1 y position.
  * @param  x2: specifies the point 2 x position.
  * @param  y2: specifies the point 2 y position.
  * @retval None
  */
void LCD_DrawUniLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
  int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 
  yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 
  curpixel = 0;
  
  deltax = ABS(x2 - x1);        /* The difference between the x's */
  deltay = ABS(y2 - y1);        /* The difference between the y's */
  x = x1;                       /* Start x off at the first pixel */
  y = y1;                       /* Start y off at the first pixel */
  
  if (x2 >= x1)                 /* The x-values are increasing */
  {
    xinc1 = 1;
    xinc2 = 1;
  }
  else                          /* The x-values are decreasing */
  {
    xinc1 = -1;
    xinc2 = -1;
  }
  
  if (y2 >= y1)                 /* The y-values are increasing */
  {
    yinc1 = 1;
    yinc2 = 1;
  }
  else                          /* The y-values are decreasing */
  {
    yinc1 = -1;
    yinc2 = -1;
  }
  
  if (deltax >= deltay)         /* There is at least one x-value for every y-value */
  {
    xinc1 = 0;                  /* Don't change the x when numerator >= denominator */
    yinc2 = 0;                  /* Don't change the y for every iteration */
    den = deltax;
    num = deltax / 2;
    numadd = deltay;
    numpixels = deltax;         /* There are more x-values than y-values */
  }
  else                          /* There is at least one y-value for every x-value */
  {
    xinc2 = 0;                  /* Don't change the x for every iteration */
    yinc1 = 0;                  /* Don't change the y when numerator >= denominator */
    den = deltay;
    num = deltay / 2;
    numadd = deltax;
    numpixels = deltay;         /* There are more y-values than x-values */
  }
  
  for (curpixel = 0; curpixel <= numpixels; curpixel++)
  {
    PutPixel(x, y);             /* Draw the current pixel */
    num += numadd;              /* Increase the numerator by the top of the fraction */
    if (num >= den)             /* Check if numerator >= denominator */
    {
      num -= den;               /* Calculate the new numerator value */
      x += xinc1;               /* Change the x as appropriate */
      y += yinc1;               /* Change the y as appropriate */
    }
    x += xinc2;                 /* Change the x as appropriate */
    y += yinc2;                 /* Change the y as appropriate */
  }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机精品视频在线| 不卡av电影在线播放| 青青草精品视频| 亚洲成年人影院| 亚洲成人在线网站| 亚洲r级在线视频| 天天亚洲美女在线视频| 亚洲国产视频一区| 亚洲一二三四在线| 性做久久久久久| 美女视频网站久久| 久久精品国产77777蜜臀| 久久激情综合网| 国产一区二区网址| 成人免费视频免费观看| 成人精品国产一区二区4080| 成人深夜福利app| 91丨九色丨蝌蚪丨老版| 欧美亚洲国产一卡| 日韩欧美一级二级三级久久久| 日韩一二三四区| 国产欧美一区二区精品性色超碰| 国产精品欧美经典| 亚洲影视资源网| 日本一区中文字幕 | 国产在线不卡视频| 成人精品一区二区三区中文字幕| 99精品1区2区| 3d成人动漫网站| 亚洲精品一区二区三区四区高清| 国产欧美一区二区精品秋霞影院| 亚洲欧洲色图综合| 亚洲一区二区三区四区五区黄| 麻豆freexxxx性91精品| 粉嫩一区二区三区在线看| 色94色欧美sute亚洲线路二| 91精品国产一区二区三区蜜臀 | 亚洲国产色一区| 久久99最新地址| eeuss鲁片一区二区三区在线观看| 色噜噜狠狠成人中文综合| 日韩欧美成人激情| 国产精品护士白丝一区av| 婷婷激情综合网| 国产精品1024久久| 欧美日韩黄色影视| 国产情人综合久久777777| 亚洲欧美日韩国产一区二区三区| 日本成人在线不卡视频| 成人开心网精品视频| 51精品视频一区二区三区| 国产婷婷一区二区| 五月激情丁香一区二区三区| 成人性生交大片免费看视频在线 | 国产成人在线免费| 欧美日韩国产首页在线观看| 久久久久国产精品麻豆ai换脸 | 国产高清不卡二三区| 欧美在线免费视屏| 亚洲国产精品av| 日韩激情一区二区| 91同城在线观看| 久久精品男人的天堂| 日本午夜精品视频在线观看 | 久久伊人中文字幕| 亚洲制服丝袜av| 豆国产96在线|亚洲| 日韩精品中文字幕一区二区三区| 亚洲男人的天堂一区二区| 国产精品77777| 日韩免费看的电影| 亚洲国产精品一区二区久久恐怖片| 国产精品888| 精品国产乱码久久久久久老虎| 亚洲国产成人tv| 国产成人精品免费一区二区| 日韩精品一区二区三区视频播放 | 日韩你懂的在线播放| 亚洲成人精品一区| 99精品国产一区二区三区不卡 | 国产麻豆精品theporn| 欧美极品美女视频| 七七婷婷婷婷精品国产| 欧美日韩一级黄| 一区二区三区精品视频在线| 岛国av在线一区| 国产亚洲短视频| 国产乱码精品一区二区三区av | 日本美女一区二区| 欧美日韩精品一区二区天天拍小说 | 国产亚洲婷婷免费| 蜜桃视频在线观看一区二区| 欧美区视频在线观看| 亚洲中国最大av网站| 在线视频欧美区| 亚洲精品国产成人久久av盗摄| 成人不卡免费av| 国产精品久久久久久久岛一牛影视| 国产成人亚洲精品狼色在线| 久久美女艺术照精彩视频福利播放| 久久精品国产亚洲aⅴ| 欧美va亚洲va国产综合| 激情文学综合网| 久久欧美中文字幕| 国产一区二区不卡| 国产日韩在线不卡| 成人免费毛片片v| 国产精品福利一区| 在线免费观看日本一区| 一区二区免费视频| 欧洲亚洲国产日韩| 五月婷婷久久丁香| 日韩一区二区三区电影| 久草热8精品视频在线观看| 日韩一区二区三| 国产一区91精品张津瑜| 国产女主播视频一区二区| 成人黄色小视频在线观看| 中文子幕无线码一区tr| 日本电影亚洲天堂一区| 午夜a成v人精品| 精品日韩成人av| av中文字幕一区| 亚洲一区二区三区三| 亚洲三级在线播放| 色八戒一区二区三区| 日产欧产美韩系列久久99| 久久久亚洲精华液精华液精华液| 丁香亚洲综合激情啪啪综合| 中文字幕亚洲成人| 欧美三级电影一区| 激情五月激情综合网| 日韩理论片在线| 777色狠狠一区二区三区| 国产福利一区二区三区在线视频| 国产精品久久看| 欧美日韩国产美| 国内一区二区在线| 亚洲日穴在线视频| 日韩欧美美女一区二区三区| 成人黄色电影在线| 日韩福利视频导航| 国产精品丝袜一区| 欧美午夜片在线看| 国产一区二区三区在线观看精品| 亚洲美女在线一区| 日韩欧美在线综合网| 97精品久久久午夜一区二区三区| 性做久久久久久| 国产精品妹子av| 欧美放荡的少妇| www.成人在线| 免费人成在线不卡| 椎名由奈av一区二区三区| 欧美精品日韩一区| av电影一区二区| 看片的网站亚洲| 亚洲精品免费电影| 久久男人中文字幕资源站| 在线欧美日韩国产| 国产精品一区二区91| 亚洲成人在线观看视频| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美中文字幕亚洲一区二区va在线| 国内久久精品视频| 亚洲成av人**亚洲成av**| 国产精品国产三级国产aⅴ入口 | 欧美在线不卡一区| 国产成人午夜99999| 日韩国产一二三区| 亚洲色图20p| 国产三区在线成人av| 91精品久久久久久久99蜜桃| 成人小视频免费在线观看| 久88久久88久久久| 香蕉乱码成人久久天堂爱免费| 国产精品护士白丝一区av| 2020国产精品久久精品美国| 欧美丰满一区二区免费视频 | 亚洲精品日韩综合观看成人91| 精品成人在线观看| 91精品国产综合久久久久久久久久 | 国产精品色噜噜| 欧美不卡视频一区| 337p亚洲精品色噜噜| 在线影视一区二区三区| 99国产精品久久| 不卡在线观看av| 成人免费看视频| 国产成人精品午夜视频免费| 国产一区二区三区蝌蚪| 国内偷窥港台综合视频在线播放| 蜜桃久久精品一区二区| 丝袜诱惑亚洲看片| 日日摸夜夜添夜夜添精品视频 | 久久精品国产99久久6| 日本欧美大码aⅴ在线播放| 视频一区中文字幕| 午夜精品国产更新| 水野朝阳av一区二区三区|