找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5849|回复: 10
打印 上一主题 下一主题
收起左侧

STM32 I/O 口驱动程序 ILI9325 TFT

  [复制链接]
跳转到指定楼层
楼主
STM32F103 使用 IO 口驱动 320240 TFT(ILI9325) 液晶屏头文件+函数文件。分享给大家,希望对大家有用。

完整源码下载:
ILI9325.rar (7.13 KB, 下载次数: 128)


主程序:

  1. #include "mILI9325.h"
  2. #include "mFONT.h"

  3. extern  mDis_Color  ILI9325;
  4. GPIO_InitTypeDef GPIO_InitStructure;

  5. //Red Gray scale灰阶(65K)
  6. const unsigned char RedGrayScale[]={
  7.   0x00,0x00, 0x08,0x00, 0x10,0x00, 0x18,0x00, 0x20,0x00, 0x28,0x00, 0x30,0x00, 0x38,0x00,
  8.   0x40,0x00, 0x48,0x00, 0x50,0x00, 0x58,0x00, 0x60,0x00, 0x68,0x00, 0x70,0x00, 0x78,0x00,
  9.   0x80,0x00, 0x88,0x00, 0x90,0x00, 0x98,0x00, 0xA0,0x00, 0xA8,0x00, 0xB0,0x00, 0xB8,0x00,
  10.   0xC0,0x00, 0xC8,0x00, 0xD0,0x00, 0xD8,0x00, 0xE0,0x00, 0xE8,0x00, 0xF0,0x00, 0xF8,0x00,
  11. };
  12. //Green Gray scale灰阶(65K)
  13. const unsigned char  GreenGrayScale[]={
  14.   0x00,0x00, 0x00,0x60, 0x00,0xA0, 0x00,0xE0, 0x01,0x00, 0x01,0x60, 0x01,0xA0, 0x01,0xE0,
  15.   0x02,0x00, 0x02,0x60, 0x02,0xA0, 0x02,0xE0, 0x03,0x00, 0x03,0x60, 0x03,0xA0, 0x03,0xE0,
  16.   0x04,0x00, 0x04,0x60, 0x04,0xA0, 0x04,0xE0, 0x05,0x00, 0x05,0x60, 0x05,0xA0, 0x05,0xE0,
  17.   0x06,0x00, 0x06,0x60, 0x06,0xA0, 0x06,0xE0, 0x07,0x00, 0x07,0x60, 0x07,0xA0, 0x07,0xE0,
  18. };

  19. //Blue Gray scale灰阶(65K)
  20. const unsigned char  BlueGrayScale[]={
  21.   0x00,0x00, 0x00,0x01, 0x00,0x02, 0x00,0x03, 0x00,0x04, 0x00,0x05, 0x00,0x06, 0x00,0x07,
  22.   0x00,0x08, 0x00,0x09, 0x00,0x0A, 0x00,0x0B, 0x00,0x0C, 0x00,0x0D, 0x00,0x0E, 0x00,0x0F,
  23.   0x00,0x10, 0x00,0x11, 0x00,0x12, 0x00,0x13, 0x00,0x14, 0x00,0x15, 0x00,0x16, 0x00,0x17,
  24.   0x00,0x18, 0x00,0x19, 0x00,0x1A, 0x00,0x1B, 0x00,0x1C, 0x00,0x1D, 0x00,0x1E, 0x00,0x1F,
  25. };

  26. //White Gray scale灰阶(65K)
  27. const unsigned char  WhiteGrayScale[]={
  28.   0x00,0x00, 0x08,0x61, 0x10,0xA2, 0x18,0xE3, 0x21,0x04, 0x29,0x65, 0x31,0xA6, 0x39,0xE7,
  29.   0x42,0x08, 0x4A,0x69, 0x52,0xAA, 0x5A,0xEB, 0x63,0x0C, 0x6B,0x6D, 0x73,0xAE, 0x7B,0xEF,
  30.   0x84,0x10, 0x8C,0x71, 0x94,0xB2, 0x9C,0xF3, 0xA5,0x14, 0xAD,0x75, 0xB5,0xB6, 0xBD,0xF7,
  31.   0xC6,0x18, 0xCE,0x79, 0xD6,0xBA, 0xDE,0xFB, 0xE7,0x1C, 0xEF,0x7D, 0xF7,0xBE, 0xFF,0xFF,
  32. };

  33. /*******************************************************************************
  34. * Function Name  : Delay_mS
  35. * Description    : 延时功能函数
  36. * Input          : nCount 延时值( mS )
  37. * Output         : None
  38. * Return         : None
  39. *******************************************************************************/
  40. void  Delay_mS (uint16_t nCount){
  41.   unsigned int  i;
  42.   do{
  43.     for(i=0; i<5000; i++);
  44.   }
  45.   while(nCount--);
  46. }

  47. /*******************************************************************************
  48. * Function Name  : Delay_uS
  49. * Description    : 延时功能函数
  50. * Input          : nCount 延时值( uS )
  51. * Output         : None
  52. * Return         : None
  53. *******************************************************************************/
  54. void  Delay_uS (uint16_t nCount){
  55.   unsigned int  i;
  56.   do{
  57.     for(i=0; i<5; i++);
  58.   }while(nCount--);
  59. }

  60. /*******************************************************************************
  61. * Function Name  : ILI9325_CtrlLinesConfig
  62. * Description    : Configures LCD control lines in Output Push-Pull mode.
  63. * Input          : None
  64. * Output         : None
  65. * Return         : None
  66. *******************************************************************************/
  67. void ILI9325_Reset(void){
  68.   //对TFT进行复位一次
  69.   ILI9325_RESET_HIGH();
  70.   Delay_mS(50);
  71.   ILI9325_RESET_LOW();                              
  72.   Delay_mS(100);
  73.   ILI9325_RESET_HIGH();                    
  74.   Delay_mS(50);
  75. }

  76. /*******************************************************************************
  77. * Function Name  : ILI9325_CtrlLinesConfig 控制线配置
  78. * Description    : Configures LCD control lines in Output Push-Pull mode.
  79. * Input          : None
  80. * Output         : None
  81. * Return         : None
  82. *******************************************************************************/
  83. void ILI9325_CtrlLinesConfig(void) {
  84.   GPIO_InitTypeDef GPIO_InitStructure;
  85.   
  86.   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOB, ENABLE);
  87.   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOD, ENABLE);
  88.   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOE, ENABLE);
  89.   
  90.   /* Configure PD.7--PD.11 as Output push-pull */
  91.   GPIO_InitStructure.GPIO_Pin = GPIO_LCD_CS | GPIO_LCD_RS | GPIO_LCD_WR | GPIO_LCD_RD |
  92.                                 GPIO_LCD_PW ;
  93.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  94.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  95.   GPIO_Init(GPIOB, &GPIO_InitStructure);

  96.   GPIO_InitStructure.GPIO_Pin = GPIO_LCD_RESET;
  97.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  98.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  99.   GPIO_Init(GPIOE, &GPIO_InitStructure);
  100.   
  101.   /* Configure PE.00 -- PE.15 as Output push-pull */
  102.   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  103.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  104.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  105.   GPIO_Init(GPIOD, &GPIO_InitStructure);
  106. }

  107. /*******************************************************************************
  108. * Function Name  : ILI9325_WriteIndex
  109. * Description    : 寻址寄存器
  110. * Input          : Index
  111. * Output         : None
  112. * Return         : None
  113. *******************************************************************************/
  114. void ILI9325_WriteIndex(uint8_t Index) {
  115.   //写索引寄存器
  116.   ILI9325_RS_LOW();
  117.   ILI9325_CS_LOW();
  118.   ILI9325_RD_HIGH();
  119.   GPIO_Write(GPIOD,Index);
  120.   ILI9325_WR_LOW();
  121.   ILI9325_WR_HIGH();
  122.   ILI9325_CS_HIGH();
  123. }

  124. /*******************************************************************************
  125. * Function Name  : ILI9325_WriteData
  126. * Description    :
  127. * Input          : Data
  128. * Output         : None
  129. * Return         : None
  130. *******************************************************************************/
  131. void ILI9325_WriteData(uint16_t Data) {
  132.   ILI9325_RS_HIGH();
  133.   ILI9325_CS_LOW();
  134.   ILI9325_RD_HIGH();
  135.   GPIO_Write(GPIOD,Data);
  136.   ILI9325_WR_LOW();
  137.   ILI9325_WR_HIGH();
  138.   ILI9325_CS_HIGH();
  139. }



  140. /*******************************************************************************
  141. * Function Name  : ILI9325_ReadData
  142. * Description    :
  143. * Input          : None
  144. * Output         : None
  145. * Return         : None
  146. *******************************************************************************/
  147. uint16_t ILI9325_ReadData(void) {
  148.   unsigned short Data=0;
  149.   
  150.   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  151.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  152.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
  153.   GPIO_Init(GPIOD, &GPIO_InitStructure);
  154.   
  155.   ILI9325_CS_LOW();
  156.   ILI9325_RS_HIGH();
  157.   ILI9325_WR_HIGH();
  158.   //丢掉第一次读出的不确定数
  159.   ILI9325_RD_LOW();
  160.   Data = GPIO_ReadInputData(GPIOD);
  161.   ILI9325_RD_HIGH();
  162.   
  163.   ILI9325_RD_LOW();
  164.   Data = GPIO_ReadInputData(GPIOD);
  165.   ILI9325_RD_HIGH();
  166.   
  167.   ILI9325_CS_HIGH();
  168.   
  169.   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  170.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  171.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  172.   GPIO_Init(GPIOD, &GPIO_InitStructure);
  173.   
  174.   return Data;
  175. }

  176. /*******************************************************************************
  177. * Function Name  : ILI9325_WriteReg
  178. * Description    : Writes to the selected LCD register.
  179. * Input          : - LCD_Reg: address of the selected register.
  180. *                  - LCD_RegValue: value to write to the selected register.
  181. * Output         : None
  182. * Return         : None
  183. *******************************************************************************/
  184. /*void ILI9325_WriteReg(unsigned char LCD_Reg, unsigned short LCD_RegValue) {
  185.   //写索引寄存器
  186.   ILI9325_WriteIndex(unsigned char LCD_Reg);
  187.   //向所寻寄存器中写入值
  188.   ILI9325_WriteData(unsigned short LCD_RegValue);
  189. }*/

  190. void ILI9325_WriteReg(uint8_t LCD_Reg, uint16_t LCD_RegValue) {
  191.   //写索引寄存器
  192.   ILI9325_RS_LOW();
  193.   ILI9325_CS_LOW();
  194.   ILI9325_RD_HIGH();
  195.   GPIO_Write(GPIOD,LCD_Reg);
  196.   ILI9325_WR_LOW();
  197.   ILI9325_WR_HIGH();
  198.   ILI9325_CS_HIGH();
  199.   //向所寻寄存器中写入值
  200.   ILI9325_RS_HIGH();
  201.   ILI9325_CS_LOW();
  202.   ILI9325_RD_HIGH();
  203.   GPIO_Write(GPIOD,LCD_RegValue);
  204.   ILI9325_WR_LOW();
  205.   ILI9325_WR_HIGH();
  206.   ILI9325_CS_HIGH();
  207. }

  208. /*******************************************************************************
  209. * Function Name  : ILI9325_BackLight(
  210. * Description    : LCD 背景灯状态设置.
  211. * Input          : - State: 背景灯状态 ON 或者 OFF
  212. * Output         : None
  213. * Return         : None
  214. *******************************************************************************/
  215. void ILI9325_BackLight(uint8_t State) {
  216.   if(State == ON)
  217.     ILI9325_PW_HIGH();
  218.   else
  219.     ILI9325_PW_LOW();
  220. }

  221. /*******************************************************************************
  222. * Function Name  : ILI9325_WriteGRAM
  223. * Description    : Writes to the LCD RAM.
  224. * Input          : - RGB_Code: the pixel color in RGB mode (5-6-5).
  225. * Output         : None
  226. * Return         : None
  227. *******************************************************************************/
  228. void ILI9325_WriteGRAM(uint16_t RGB_Code) {
  229. ILI9325_WriteReg(R22,RGB_Code);
  230. }

  231. /*******************************************************************************
  232. * Function Name  : ILI9325_Init
  233. * Description    : Initializes LCD.
  234. * Input          : None
  235. * Output         : None
  236. * Return         : None
  237. *******************************************************************************/
  238. void ILI9325_Init(void) {
  239.   //Driver IC:ILI9325
  240.   
  241.   ILI9325_CtrlLinesConfig();  //TFT的系统接口配置(本TFT模块采用的是i80 16-bit System Bus)
  242.   ILI9325_Reset();            //复位一次
  243.   
  244.   //ILI9325_WriteReg(0x00E3, 0x3008);
  245.   //ILI9325_WriteReg(0x00E7, 0x0012);
  246.   //ILI9325_WriteReg(0x00EF, 0x1231);
  247.   ILI9325_WriteReg(0x00E5, 0x78F0);
  248.   
  249.   /*其中的SM位配合R96中的GS位,来决定图像刷新方向。本配置为从上到下
  250.   SM GS=00从下到上  SM GS=01从上到下  SM GS=10 从右到左  SM GS=11 从左到右*/
  251.   ILI9325_WriteReg(R1,  0x0100);//R1:驱动输出控制
  252.   
  253.   ILI9325_WriteReg(R2,  0x0700);//line inversion
  254.   /*GRAM水平方向更新*/
  255.   ILI9325_WriteReg(R3,  0x1018);//R3:数据进入模式设置 1030

  256.   /*保持原图像大小*/
  257.   ILI9325_WriteReg(R4,  0x0000);//R4:可将原图像缩小到1/2或1/4来显示
  258.   
  259. /*****************Display Control*******************/
  260.   ILI9325_WriteReg(R8,  0x0202);//0207
  261.   ILI9325_WriteReg(R9,  0x0000);
  262.   ILI9325_WriteReg(R0A, 0x0000);
  263.   ILI9325_WriteReg(R0C, 0x0000);
  264.   ILI9325_WriteReg(R0D, 0x0000);
  265.   ILI9325_WriteReg(R0F, 0x0000);
  266.   
  267. /***************Power Control*********************/  
  268.   ILI9325_WriteReg(R10, 0x0000);
  269.   ILI9325_WriteReg(R11, 0x0007);//0004
  270.   ILI9325_WriteReg(R12, 0x0000);
  271.   ILI9325_WriteReg(R13, 0x0000);
  272.   ILI9325_WriteReg(R7,  0x0000);
  273.   Delay_mS(200);
  274.   ILI9325_WriteReg(R10, 0x1690);
  275.   ILI9325_WriteReg(R11, 0x0227);//0224
  276.   Delay_mS(50);
  277.   ILI9325_WriteReg(R12, 0x009d);//001b
  278.   Delay_mS(50);
  279.   ILI9325_WriteReg(R13, 0x1900);//1100
  280.   ILI9325_WriteReg(R29, 0x0025);//0008
  281.   ILI9325_WriteReg(R2B, 0x000d);
  282.   Delay_mS(50);
  283.   
  284.   //默认显示坐标(0,0)
  285.   ILI9325_WriteReg(R20, 0x0000);
  286.   ILI9325_WriteReg(R21, 0x0000);
  287.   
  288. /**************Gamma Control***********/  
  289.   ILI9325_WriteReg(R30, 0x0007);
  290.   ILI9325_WriteReg(R31, 0x0303);
  291.   ILI9325_WriteReg(R32, 0x0003);
  292.   ILI9325_WriteReg(R35, 0x0206);
  293.   ILI9325_WriteReg(R36, 0x0008);
  294.   ILI9325_WriteReg(R37, 0x0406);
  295.   ILI9325_WriteReg(R38, 0x0304);
  296.   ILI9325_WriteReg(R39, 0x0007);
  297.   ILI9325_WriteReg(R3C, 0x0602);
  298.   ILI9325_WriteReg(R3D, 0x0008);

  299. /********Sets display window,默认为整个屏幕********/
  300.   ILI9325_WriteReg(R50, 0x0000);
  301.   ILI9325_WriteReg(R51, 0x00ee);
  302.   ILI9325_WriteReg(R52, 0x0000);
  303.   ILI9325_WriteReg(R53, 0x013f);

  304. /*******Gate Scan Control*************************/  
  305.   ILI9325_WriteReg(R60, 0xa700);
  306.   ILI9325_WriteReg(R61, 0x0001);
  307.   ILI9325_WriteReg(R6A, 0x0000);
  308. /********Partial Image Display Position Control***/
  309.   ILI9325_WriteReg(R80, 0x0000);
  310.   ILI9325_WriteReg(R81, 0x0000);
  311.   ILI9325_WriteReg(R82, 0x0000);
  312.   ILI9325_WriteReg(R83, 0x0000);
  313.   ILI9325_WriteReg(R84, 0x0000);
  314.   ILI9325_WriteReg(R85, 0x0000);
  315. /*******Panel Interface Control******************/
  316.   ILI9325_WriteReg(R90, 0x0010);
  317.   ILI9325_WriteReg(R92, 0x0600);
  318.   
  319.   ILI9325_WriteReg(R7,  0x0133);
  320.   ILI9325_WriteReg(R0,  0x0022);
  321.   
  322.   ILI9325.TextColor = 0x0000;
  323.   ILI9325.BackColor = 0x667F;
  324.   ILI9325_FillSCR(ILI9325.BackColor);
  325.   
  326.   ILI9325_BackLight(ON);
  327. }

  328. /*******************************************************************************
  329. * Function Name  : ILI9325_SetDisplayWindow
  330. * Description    : 设置显示窗口
  331. * Input          : - startx:  specifies the X buttom left position.
  332. *                  - starty:  specifies the Y buttom left position.
  333. *                  - endx:    display window width.
  334. *                  - endy:    display window height.
  335. * Output         : None
  336. * Return         : None
  337. *******************************************************************************/
  338. void ILI9325_SetDisplayWindow(uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy) {
  339.         // 顺转90度
  340.   ILI9325_WriteReg(R50, starty);
  341.   ILI9325_WriteReg(R51, endy);
  342.   ILI9325_WriteReg(R52, 319-endx);
  343.   ILI9325_WriteReg(R53, 319-startx);
  344.   
  345.   ILI9325_WriteReg(R20, endy);
  346.   ILI9325_WriteReg(R21, 319-endx);
  347.   
  348.   /*// 逆转90度
  349.   ILI9325_WriteReg(R50, 239-endy);
  350.   ILI9325_WriteReg(R51, 239-starty);
  351.   ILI9325_WriteReg(R52, startx);
  352.   ILI9325_WriteReg(R53, endx);
  353.   
  354.   ILI9325_WriteReg(R20, 239-starty);
  355.   ILI9325_WriteReg(R21, startx);
  356.   */
  357. }

  358. /*******************************************************************************
  359. * Function Name  : ILI9325_EnterSleep
  360. * Description    : LCD 进入休眠模式
  361. * Input          : None
  362. * Output         : None
  363. * Return         : None
  364. *******************************************************************************/
  365. void ILI9325_EnterSleep(void) {
  366.   ILI9325_WriteReg(R7, 0x0131);
  367.   Delay_mS(10);
  368.   ILI9325_WriteReg(R7, 0x0130);
  369.   Delay_mS(10);
  370.   ILI9325_WriteReg(R7, 0x0000);
  371.        
  372.         ILI9325_WriteReg(R10, 0x0080);
  373.   ILI9325_WriteReg(R11, 0x0000);
  374.   ILI9325_WriteReg(R12, 0x0000);
  375.   ILI9325_WriteReg(R13, 0x0000);
  376.   Delay_mS(10);
  377.   ILI9325_WriteReg(R10, 0x0082);
  378. }

  379. /*******************************************************************************
  380. * Function Name  : ILI9325_ExitSleep
  381. * Description    : LCD 退出休眠模式
  382. * Input          : None
  383. * Output         : None
  384. * Return         : None
  385. *******************************************************************************/
  386. void ILI9325_ExitSleep(void) {
  387.   ILI9325_WriteReg(R10, 0x0080);
  388.   ILI9325_WriteReg(R11, 0x0000);
  389.   ILI9325_WriteReg(R12, 0x0000);
  390.   ILI9325_WriteReg(R13, 0x0000);
  391.   Delay_mS(10);
  392.   ILI9325_WriteReg(R10, 0x1490);
  393.   ILI9325_WriteReg(R11, 0x0224);
  394.   Delay_mS(10);
  395.   ILI9325_WriteReg(R12, 0x001A);
  396.   Delay_mS(10);
  397.   ILI9325_WriteReg(R13, 0x1100);
  398.   ILI9325_WriteReg(R29, 0x0011);
  399.   Delay_mS(10);
  400.   ILI9325_WriteReg(R7, 0x0133);
  401. }

  402. /*******************************************************************************
  403. * Function Name  : ILI9325_SetPixel
  404. * Description    : 在指定的 x,y 坐标描点
  405. * Input          : -x: 指定描点坐标 x 值
  406. *                  -y: 指定描点坐标 y 值
  407. *                  -color: 描点颜色值
  408. * Output         : None
  409. * Return         : None
  410. *******************************************************************************/
  411. void ILI9325_SetPixel(uint16_t x, uint16_t y, uint16_t color) {
  412.         ILI9325_SetDisplayWindow(x,y,x,y);
  413.         ILI9325_WriteGRAM(color);
  414. }

  415. /*******************************************************************************
  416. * Function Name  : ILI9325_RectangleFill
  417. * Description    : 显示窗口内以指定颜色局部填充
  418. * Input          : -x: 指定起点坐标 x 值
  419. *                  -y: 指定起点坐标 y 值
  420. *                  -width: 指定填充宽度
  421. *                  -hight: 指定填充高度
  422. *                  -color: 指定填充颜色
  423. * Output         : None
  424. * Return         : None
  425. *******************************************************************************/
  426. void  ILI9325_RectangleFill(uint16_t x, uint16_t y, uint16_t width, uint16_t hight, uint16_t color) {       
  427.         uint16_t i,j;

  428.         ILI9325_SetDisplayWindow(x, y, x+width-1, y+hight-1);

  429.         for(i=0; i<width; i++) {   
  430.                 for(j=0; j<hight; j++) {
  431.                         ILI9325_WriteGRAM(color);
  432.                 }
  433.         }
  434. }

  435. /*******************************************************************************
  436. * Function Name  : ILI9325_FillSCR
  437. * Description    : 显示窗口全部以指定颜色填充
  438. * Input          : -color: 指定填充颜色
  439. * Output         : None
  440. * Return         : None
  441. *******************************************************************************/
  442. void  ILI9325_FillSCR(uint16_t color) {       
  443.         uint16_t i,j;

  444.         ILI9325_SetDisplayWindow(0, 0, 319, 239);

  445.         for(i=0; i<320; i++) {   
  446.                 for(j=0; j<240; j++) {
  447.                         ILI9325_WriteGRAM(color);
  448.                 }
  449.         }
  450. }

  451. /*******************************************************************************
  452. * Function Name  : ILI9325_DrawBMP
  453. * Description    : 图片显示
  454. * Input          : -x: 指定起点坐标 x 值
  455. *                  -y: 指定起点坐标 y 值
  456. *                  -width: 指定图片宽度
  457. *                  -hight: 指定图片高度
  458. *                  -*pBmp: 图片数据指针
  459. * Output         : None
  460. * Return         : None
  461. *******************************************************************************/
  462. void ILI9325_DrawBMP(uint16_t x,uint16_t y,uint16_t width,uint16_t hight,const uint8_t *pBmp) {
  463.         uint16_t i,j;
  464.         uint16_t Data;

  465.         ILI9325_SetDisplayWindow(x, y, x+width-1, y+hight-1);

  466.         for(i=0; i<width; i++) {   
  467.                 for(j=0; j<hight; j++) {
  468.                         Data = (*pBmp++)<<8;
  469.                         Data = Data | (*pBmp++);
  470.       
  471.       ILI9325_WriteGRAM(Data);
  472.                 }
  473.         }
  474. }



  475. /*******************************************************************************
  476. * Function Name  : ILI9325_SetCursor
  477. * Description    : Sets the cursor position.
  478. * Input          : - Xpos: specifies the X position.
  479. *                  - Ypos: specifies the Y position.
  480. * Output         : None
  481. * Return         : None
  482. *******************************************************************************/
  483. void ILI9325_SetCursor(uint16_t x, uint16_t y) {
  484.   ILI9325_SetDisplayWindow(x, y, x, y);
  485.   //ILI9325_WriteReg(R20, x);
  486.   //ILI9325_WriteReg(R21, y);
  487. }

  488. /*******************************************************************************
  489. * Function Name  : ILI9325_BGR2RGB
  490. * Description    :
  491. * Input          :
  492. * Output         :
  493. * Return         :
  494. *******************************************************************************/
  495. uint16_t ILI9325_BGR2RGB(uint16_t BGR_Code) {
  496.   uint16_t  r, g, b;

  497.   r = BGR_Code & 0x1f;
  498.   g = (BGR_Code>>5)  & 0x3f;
  499.   b = (BGR_Code>>11) & 0x1f;
  500.   
  501.   return( (r<<11) + (g<<5) + (b<<0) );
  502. }

  503. /*******************************************************************************
  504. * Function Name  : ILI9325_ReadRegister
  505. * Description    : Get the data of the appointed register.
  506. * Input          :
  507. * Output         :
  508. * Return         :
  509. *******************************************************************************/
  510. uint16_t ILI9325_ReadRegister(uint16_t LCD_Reg) {
  511.   //写索引寄存器
  512.   ILI9325_WriteIndex(LCD_Reg);
  513.   return(ILI9325_ReadData());
  514. }

  515. /*******************************************************************************
  516. * Function Name  : CheckController
  517. * Description    : 读取 LCD 标示字符串
  518. * Input          :
  519. * Output         :
  520. * Return         : int 类型标示字符串代码
  521. *******************************************************************************/
  522. uint16_t CheckController(void) {
  523.   return(ILI9325_ReadRegister(R0));
  524. }

  525. /*******************************************************************************
  526. * Function Name  : ILI9325_GetPointRGB 获得指定像素点的颜色数据
  527. * Description    : Get the color data of the appointed pixel.
  528. * Input          :
  529. * Output         :
  530. * Return         :
  531. *******************************************************************************/
  532. uint16_t ILI9325_GetPointRGB(uint16_t x,uint16_t y) {
  533.   //ILI9325_SetDisplayWindow(x, y, x, y);
  534.   ILI9325_SetCursor(x,y);
  535.   return(ILI9325_BGR2RGB(ILI9325_ReadRegister(R22)));
  536. }

  537. /*******************************************************************************
  538. * Function Name  : ILI9325_ClearLine
  539. * Description    : Clears the selected line.
  540. * Input          : - Line: the Line to be cleared.
  541. *                    This parameter can be one of the following values:
  542. *                  - Linex: where x can be 0..19
  543. * Output         : None
  544. * Return         : None
  545. *******************************************************************************/
  546. void ILI9325_ClearLine(uint8_t Line) {
  547.   //ILI9325_DisplayStringLine(Line, "                    ");
  548. }

  549. /*******************************************************************************
  550. * Function Name  : ILI9325_SetTextColor
  551. * Description    : Sets the Text color.
  552. * Input          : - Color: specifies the Text color code RGB(5-6-5).
  553. * Output         : - TextColor: Text color global variable used by LCD_DrawChar
  554. *                  and LCD_DrawPicture functions.
  555. * Return         : None
  556. *******************************************************************************/
  557. void ILI9325_SetTextColor(uint16_t Color) {
  558.   ILI9325.TextColor = Color;
  559. }

  560. /*******************************************************************************
  561. * Function Name  : ILI9325_SetBackColor
  562. * Description    : Sets the Background color.
  563. * Input          : - Color: specifies the Background color code RGB(5-6-5).
  564. * Output         : - BackColor: Background color global variable used by
  565. *                  LCD_DrawChar and LCD_DrawPicture functions.
  566. * Return         : None
  567. *******************************************************************************/
  568. void ILI9325_SetBackColor(uint16_t Color) {
  569.   ILI9325.BackColor = Color;
  570. }

  571. /******************************************************************
  572. - 功能描述:将一个32位的变量dat转为字符串,比如把1234转为"1234"
  573. - 参数说明:dat:带转的long型的变量
  574.              str:指向字符数组的指针,转换后的字节串放在其中           
  575. - 返回说明:无
  576. ******************************************************************/
  577. void u32tostr(uint32_t dat,uint8_t *str) {
  578.   int8_t temp[20];
  579.   uint8_t i=0,j=0;
  580.   i=0;
  581.   while(dat){
  582.     temp[i]=dat%10+0x30;
  583.     i++;
  584.     dat/=10;
  585.   }
  586.   j=i;
  587.   for(i=0;i<j;i++) {
  588.     str[i]=temp[j-i-1];
  589.   }
  590.   if(!i) {str[i++]='0';}
  591.   str[i]=0;
  592. }

  593. /******************************************************************
  594. - 功能描述:将一个字符串转为32位的变量,比如"1234"转为1234
  595. - 参数说明:str:指向待转换的字符串           
  596. - 返回说明:转换后的数值
  597. ******************************************************************/

  598. unsigned long strtou32(unsigned char *str) {
  599.   uint32_t  temp=0;
  600.   uint32_t  fact=1;
  601.   uint8_t   len=StrLength(str);
  602.   uint8_t   i;
  603.   for(i=len;i>0;i--) {
  604.     temp+=((str[i-1]-0x30)*fact);
  605.     fact*=10;
  606.   }
  607.   return temp;
  608. }

  609. /*******************************************************************************
  610. * Function Name  : StrLength
  611. * Description    : Returns length of string.
  612. * Input          : - Str: Character Pointer.
  613. * Output         : None
  614. * Return         : String length.
  615. *******************************************************************************/
  616. static uint32_t StrLength(uint8_t *Str) {
  617.   uint32_t Index = 0;

  618.   /* Increment the Index unless the end of string */
  619.   for(Index = 0; *Str != '\0'; Str++, Index++);

  620.   return Index;
  621. }

  622. /*******************************************************************************
  623. * Function Name  : ILI9325_DrawChar
  624. * Description    : Draws a character on LCD.
  625. * Input          : - Xpos: the Line where to display the character shape.
  626. *                    This parameter can be one of the following values:
  627. *                       - Linex: where x can be 0..19
  628. *                  - Ypos: start column address.
  629. *                  - c: pointer to the character data.
  630. * Output         : None
  631. * Return         : None
  632. *******************************************************************************/
  633. void ILI9325_DrawChar_8x16(uint16_t x, uint16_t y, uint8_t *c) {
  634.   uint16_t  i=0,j=0,str=0;
  635.   uint16_t  OffSet=0;
  636.   
  637.   OffSet = (*c - 32)*16;//寻找ASCII_Table[]中相应字符的点阵数据
  638.           /*pAscii传过来的是该字符的ASCII码数字表示(参看ASCII表,有严格
  639.           顺序表示),减32是因为第0~31号是控制字符,第32号为“空格”字符
  640.           除以16是因为在ASCII_Table[]中的每个字符点阵为16个字节表示*/
  641.   ILI9325_SetDisplayWindow(x, y, x+7, y+15);
  642.   
  643.   for(i=0;i<16;i++) {
  644.     str = *(ascii_8x16 + OffSet + i);
  645.     for(j=0;j<8;j++) {
  646.       if(str & (0x80>>j)) {
  647.         ILI9325_WriteGRAM(ILI9325.TextColor);
  648.       }
  649.       else {
  650.         ILI9325_WriteGRAM(ILI9325.BackColor);
  651.       }
  652.     }
  653.   }
  654. }

  655. /*******************************************************************************
  656. * Function Name  : ILI9325_DisplayChar
  657. * Description    : Displays one character .
  658. * Input          : - Line: the Line where to display the character shape .
  659. *                    This parameter can be one of the following values:
  660. *                       - Linex: where x can be 0..19
  661. *                  - Column: start column address.
  662. *                  - Ascii: character ascii code
  663. * Output         : None
  664. * Return         : None
  665. *******************************************************************************/
  666. void ILI9325_DisplayChar_8x16(uint16_t x, uint16_t y, uint8_t *Ascii) {
  667.   while(*Ascii != 0){
  668.     ILI9325_DrawChar_8x16(x,y,Ascii);
  669.     x += 8;
  670.     Ascii += 1;
  671.   }
  672. }

  673. /*******************************************************************************
  674. * Function Name  : ILI9325_DisplayChar
  675. * Description    : Displays one character .
  676. * Input          : - Line: the Line where to display the character shape .
  677. *                    This parameter can be one of the following values:
  678. *                       - Linex: where x can be 0..19
  679. *                  - Column: start column address.
  680. *                  - Ascii: character ascii code
  681. * Output         : None
  682. * Return         : None
  683. *******************************************************************************/
  684. void ILI9325_DrawChar_16x16(uint16_t x,uint16_t y,uint16_t Num){
  685.   uint8_t   i=0,j=0;
  686.   uint16_t  OffSet=0;
  687.   uint16_t  str=0;
  688.   
  689.   OffSet = Num*32;//寻找ASCII_Table[]中相应字符的点阵数据
  690.           /*pAscii传过来的是该字符的ASCII码数字表示(参看ASCII表,有严格
  691.           顺序表示),减32是因为第0~31号是控制字符,第32号为“空格”字符
  692.           除以16是因为在ASCII_Table[]中的每个字符点阵为16个字节表示*/
  693.   ILI9325_SetDisplayWindow(x,y,x+15,y+15);
  694.   
  695.   for(i = 0; i < 16; i++){
  696.     str = ((uint16_t)(*(china_16x16 + OffSet + i*2)<<8)+*(china_16x16 + OffSet + i*2+1));
  697.    
  698.     for(j=0;j<16;j++) {
  699.       if(str & (0x8000>>j)) {
  700.         ILI9325_WriteGRAM(ILI9325.TextColor);
  701.       }
  702.       else {
  703.         ILI9325_WriteGRAM(ILI9325.BackColor);
  704.       }
  705.     }
  706.   }
  707. }

  708. /*******************************************************************************
  709. * Function Name  : ILI9325_DrawChar
  710. * Description    : Draws a character on LCD.
  711. * Input          : - Xpos: the Line where to display the character shape.
  712. *                    This parameter can be one of the following values:
  713. *                       - Linex: where x can be 0..19
  714. *                  - Ypos: start column address.
  715. *                  - c: pointer to the character data.
  716. * Output         : None
  717. * Return         : None
  718. *******************************************************************************/
  719. void ILI9325_DrawChar_16x24(uint16_t x, uint16_t y, uint8_t *c) {
  720.   uint8_t   i=0,j=0;
  721.   uint16_t  str=0;
  722.   uint16_t  OffSet=0;
  723.   
  724.   OffSet = (*c - 32)*48;//寻找ASCII_Table[]中相应字符的点阵数据
  725.           /*pAscii传过来的是该字符的ASCII码数字表示(参看ASCII表,有严格
  726.           顺序表示),减32是因为第0~31号是控制字符,第32号为“空格”字符
  727.           除以16是因为在ASCII_Table[]中的每个字符点阵为16个字节表示*/
  728.   ILI9325_SetDisplayWindow(x, y, x+15, y+23);
  729.   
  730.   for(i=0;i<24;i++) {
  731.     str = ((uint16_t)(*(ascii_16x24 + OffSet + i*2)<<8))+(*(ascii_16x24 + OffSet + i*2+1));
  732.    
  733.     for(j=0;j<16;j++) {
  734.       if(str & (0x8000>>j)) {
  735.         ILI9325_WriteGRAM(ILI9325.TextColor);
  736.       }
  737.       else {
  738.         ILI9325_WriteGRAM(ILI9325.BackColor);
  739.       }
  740.     }
  741.   }
  742. }

  743. /*******************************************************************************
  744. * Function Name  : ILI9325_DisplayChar
  745. * Description    : Displays one character .
  746. * Input          : - Line: the Line where to display the character shape .
  747. *                    This parameter can be one of the following values:
  748. *                       - Linex: where x can be 0..19
  749. *                  - Column: start column address.
  750. *                  - Ascii: character ascii code
  751. * Output         : None
  752. * Return         : None
  753. *******************************************************************************/
  754. void ILI9325_DisplayChar_16x24(uint16_t x, uint16_t y, uint8_t *Ascii) {
  755.   while(*Ascii != 0){
  756.     ILI9325_DrawChar_16x24(x,y,Ascii);
  757.     x += 16;
  758.     Ascii += 1;
  759.   }
  760. }

  761. /*******************************************************************************
  762. * Function Name  : ILI9325_DisplayChar
  763. * Description    : Displays one character .
  764. * Input          : - Line: the Line where to display the character shape .
  765. *                    This parameter can be one of the following values:
  766. *                       - Linex: where x can be 0..19
  767. *                  - Column: start column address.
  768. *                  - Ascii: character ascii code
  769. * Output         : None
  770. * Return         : None
  771. *******************************************************************************/
  772. void ILI9325_DrawChar_24x24(uint16_t x,uint16_t y,uint16_t Num){
  773.   uint8_t   i=0,j=0;
  774.   uint16_t  OffSet=0;
  775.   uint32_t  str=0;
  776.   
  777.   OffSet = Num*72;//寻找ASCII_Table[]中相应字符的点阵数据
  778.           /*pAscii传过来的是该字符的ASCII码数字表示(参看ASCII表,有严格
  779.           顺序表示),减32是因为第0~31号是控制字符,第32号为“空格”字符
  780.           除以16是因为在ASCII_Table[]中的每个字符点阵为16个字节表示*/
  781.   ILI9325_SetDisplayWindow(x,y,x+23,y+23);
  782.   
  783.   for(i = 0; i < 24; i++){
  784.     str = ((uint32_t)(*(china_24x24 + OffSet + i*3)<<16))+((uint16_t)(*(china_24x24 + OffSet + i*3+1)<<8))+(*(china_24x24 + OffSet + i*3+2));
  785.    
  786.     for(j=0;j<24;j++) {
  787.       if(str & (0x00800000>>j)) {
  788.         ILI9325_WriteGRAM(ILI9325.TextColor);
  789.       }
  790.       else {
  791.         ILI9325_WriteGRAM(ILI9325.BackColor);
  792.       }
  793.     }
  794.   }
  795. }

  796. /*******************************************************************************
  797. * Function Name  : ILI9325_DisplayChar
  798. * Description    : Displays one character .
  799. * Input          : - Line: the Line where to display the character shape .
  800. *                    This parameter can be one of the following values:
  801. *                       - Linex: where x can be 0..19
  802. *                  - Column: start column address.
  803. *                  - Ascii: character ascii code
  804. * Output         : None
  805. * Return         : None
  806. ******************************************************************************
  807. void ILI9325_DisplayChar_24x24(uint16_t x, uint16_t y, uint8_t *Ascii) {
  808.   while(*Ascii != 0){
  809.     ILI9325_DrawChar_24x24(x,y,Ascii);
  810.     x += 24;
  811.     Ascii += 1;
  812.   }
  813. }
  814. */
  815. /*******************************************************************************
  816. * Function Name  : ILI9325_DisplayChar
  817. * Description    : Displays one character .
  818. * Input          : - Line: the Line where to display the character shape .
  819. *                    This parameter can be one of the following values:
  820. *                       - Linex: where x can be 0..19
  821. *                  - Column: start column address.
  822. *                  - Ascii: character ascii code
  823. * Output         : None
  824. * Return         : None
  825. *******************************************************************************/
  826. void ILI9325_DrawChar_24x48(uint16_t x,uint16_t y,uint8_t *c){
  827.   unsigned char i=0,j=0;
  828.   unsigned long str=0;
  829.   unsigned short  OffSet=0;
  830.   
  831.   OffSet = (*c - 32)*144;//寻找ASCII_Table[]中相应字符的点阵数据
  832.           /*pAscii传过来的是该字符的ASCII码数字表示(参看ASCII表,有严格
  833.           顺序表示),减32是因为第0~31号是控制字符,第32号为“空格”字符
  834.           除以16是因为在ASCII_Table[]中的每个字符点阵为16个字节表示*/
  835.   ILI9325_SetDisplayWindow(x,y,x+23,y+47);
  836.   
  837.   for(i = 0; i < 48; i++){
  838.     str = ((uint32_t)(*(ascii_24x48 + OffSet + i*3)<<16))+((uint16_t)(*(ascii_24x48 + OffSet + i*3+1)<<8))+(*(ascii_24x48 + OffSet + i*3+2));
  839.    
  840.     for(j=0;j<24;j++) {
  841.       if(str & (0x00800000>>j)) {
  842.         ILI9325_WriteGRAM(ILI9325.TextColor);
  843.       }
  844.       else {
  845.         ILI9325_WriteGRAM(ILI9325.BackColor);
  846.       }
  847.     }
  848.   }
  849. }

  850. /*******************************************************************************
  851. * Function Name  : ILI9325_DisplayChar
  852. * Description    : Displays one character .
  853. * Input          : - Line: the Line where to display the character shape .
  854. *                    This parameter can be one of the following values:
  855. *                       - Linex: where x can be 0..19
  856. *                  - Column: start column address.
  857. *                  - Ascii: character ascii code
  858. * Output         : None
  859. * Return         : None
  860. *******************************************************************************/
  861. void ILI9325_DisplayChar_24x48(uint16_t x, uint16_t y, uint8_t *Ascii) {
  862.   while(*Ascii != 0){
  863.     ILI9325_DrawChar_24x48(x,y,Ascii);
  864.     x += 24;
  865.     Ascii += 1;
  866.   }
  867. }

  868. /*******************************************************************************
  869. * Function Name  : ILI9325_Bre_Line
  870. * Description    : Bresenham 画线程序
  871. * Input          : - x1: 指定的画线起点 x 坐标
  872. *                  - y1: 指定的画线起点 y 坐标
  873. *                  - x2: 指定的画线终点 x 坐标
  874. *                  - y2: 指定的画线终点 y 坐标
  875. *                  - color: 画线颜色
  876. *                  - type:  类型
  877. * Output         : None
  878. * Return         : None
  879. *******************************************************************************/
  880. void ILI9325_Bre_Line(uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2,uint16_t color,uint16_t type) {
  881.   int16_t dx,dy,e,count = 0;
  882.   dx=x2-x1;
  883.   dy=y2-y1;
  884.   
  885.   if(dx>=0) {
  886.     if(dy >= 0) {             // dy>=0
  887.       if(dx>=dy) {            // 1/8 octant
  888.         e=dy-dx/2;
  889.         while(x1<=x2) {
  890.           count++;
  891.           if(type != 0){
  892.             if(count%2)
  893.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  894.             else
  895.               ILI9325_SetPixel(x1,y1,color);
  896.           }
  897.           else
  898.             ILI9325_SetPixel(x1,y1,color);
  899.          
  900.           if(e>0){
  901.             y1+=1;
  902.             e-=dx;
  903.           }
  904.           x1+=1;
  905.           e+=dy;
  906.         }
  907.       }
  908.       else {                // 2/8 octant
  909.         e=dx-dy/2;
  910.         while(y1<=y2) {
  911.           count++;
  912.           if(type != 0){
  913.             if(count%2)
  914.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  915.             else
  916.               ILI9325_SetPixel(x1,y1,color);
  917.           }
  918.           else
  919.             ILI9325_SetPixel(x1,y1,color);
  920.          
  921.           if(e>0){
  922.             x1+=1;
  923.             e-=dy;
  924.           }
  925.           y1+=1;
  926.           e+=dx;
  927.         }
  928.       }
  929.     }
  930.     else {                // dy<0
  931.       dy=-dy;             // dy=abs(dy)
  932.       if(dx>=dy) {        // 8/8 octant
  933.         e=dy-dx/2;
  934.         while(x1<=x2) {
  935.           count++;
  936.           if(type != 0){
  937.             if(count%2)
  938.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  939.             else
  940.               ILI9325_SetPixel(x1,y1,color);
  941.           }
  942.           else
  943.             ILI9325_SetPixel(x1,y1,color);
  944.          
  945.           if(e>0){
  946.             y1-=1;
  947.             e-=dx;
  948.           }
  949.           x1+=1;
  950.           e+=dy;
  951.         }
  952.       }
  953.       else {              // 7/8 octant
  954.         e=dx-dy/2;
  955.         while(y1>=y2) {
  956.           count++;
  957.           if(type != 0){
  958.             if(count%2)
  959.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  960.             else
  961.               ILI9325_SetPixel(x1,y1,color);
  962.           }
  963.           else
  964.             ILI9325_SetPixel(x1,y1,color);
  965.          
  966.           if(e>0){
  967.             x1+=1;
  968.             e-=dy;
  969.           }
  970.           y1-=1;
  971.           e+=dx;
  972.         }
  973.       }
  974.     }
  975.   }
  976.   else {                //dx<0
  977.     dx=-dx;             //dx=abs(dx)
  978.     if(dy >= 0) {       // dy>=0
  979.       if(dx>=dy) {      // 4/8 octant
  980.         e=dy-dx/2;
  981.         while(x1>=x2) {
  982.           count++;
  983.           if(type != 0){
  984.             if(count%2)
  985.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  986.             else
  987.               ILI9325_SetPixel(x1,y1,color);
  988.           }
  989.           else
  990.             ILI9325_SetPixel(x1,y1,color);
  991.          
  992.           if(e>0){
  993.             y1+=1;
  994.             e-=dx;
  995.           }
  996.           x1-=1;
  997.           e+=dy;
  998.         }
  999.       }
  1000.       else {            // 3/8 octant
  1001.         e=dx-dy/2;
  1002.         while(y1<=y2) {
  1003.           count++;
  1004.           if(type != 0){
  1005.             if(count%2)
  1006.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  1007.             else
  1008.               ILI9325_SetPixel(x1,y1,color);
  1009.           }
  1010.           else
  1011.             ILI9325_SetPixel(x1,y1,color);
  1012.          
  1013.           if(e>0){
  1014.             x1-=1;
  1015.             e-=dy;
  1016.           }
  1017.           y1+=1;
  1018.           e+=dx;
  1019.         }
  1020.       }
  1021.     }
  1022.     else {            // dy<0
  1023.       dy=-dy;         // dy=abs(dy)
  1024.       if(dx>=dy) {    // 5/8 octant
  1025.         e=dy-dx/2;
  1026.         while(x1>=x2) {
  1027.           count++;
  1028.           if(type != 0){
  1029.             if(count%2)
  1030.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  1031.             else
  1032.               ILI9325_SetPixel(x1,y1,color);
  1033.           }
  1034.           else
  1035.             ILI9325_SetPixel(x1,y1,color);
  1036.          
  1037.           if(e>0){
  1038.             y1-=1;
  1039.             e-=dx;
  1040.           }
  1041.           x1-=1;
  1042.           e+=dy;
  1043.         }
  1044.       }
  1045.       else {          // 6/8 octant
  1046.         e=dx-dy/2;
  1047.         while(y1>=y2) {
  1048.           count++;
  1049.           if(type != 0){
  1050.             if(count%2)
  1051.               ILI9325_SetPixel(x1,y1,ILI9325.BackColor);
  1052.             else
  1053.               ILI9325_SetPixel(x1,y1,color);
  1054.           }
  1055.           else
  1056.             ILI9325_SetPixel(x1,y1,color);
  1057.          
  1058.           if(e>0){
  1059.             x1-=1;
  1060.             e-=dy;
  1061.           }
  1062.           y1-=1;
  1063.           e+=dx;
  1064.         }
  1065.       }
  1066.     }
  1067.   }
  1068. }
复制代码


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏4 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:140714 发表于 2017-6-18 00:38 | 只看该作者
感谢分享,这个是我目前看到最全的函数

评分

参与人数 1黑币 +20 收起 理由
admin + 20 回帖助人的奖励!

查看全部评分

回复

使用道具 举报

板凳
ID:255044 发表于 2017-11-29 09:57 | 只看该作者
感谢楼主的无私分享
回复

使用道具 举报

地板
ID:68875 发表于 2018-2-12 22:40 | 只看该作者
感谢楼主
回复

使用道具 举报

5#
ID:68875 发表于 2018-3-10 15:33 | 只看该作者
感谢楼主的无私分享
回复

使用道具 举报

6#
ID:364764 发表于 2018-7-4 13:31 | 只看该作者
非常感谢,正需要呢,谢谢。
回复

使用道具 举报

7#
ID:364764 发表于 2018-7-6 17:01 | 只看该作者
你好我下载了你的文档,,你的代码少了一个字库头文件没法用呀,能否发一下。谢谢。。415746969@qq.com
回复

使用道具 举报

8#
ID:268693 发表于 2018-8-26 21:18 | 只看该作者
感谢,感谢楼主的分享!
回复

使用道具 举报

9#
ID:422626 发表于 2018-11-16 18:21 | 只看该作者
少了个头文件啊 #include "mFONT.h"
回复

使用道具 举报

10#
ID:50694 发表于 2019-11-19 13:42 | 只看该作者
白下了,少文件啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表