ESK32-360开发板TFT屏显示功能及扩展PCB抄板
- PCB抄板,void LCD_DrawLine(u16 x1, u16 y1, u16 x2, u16 y2, u16 Color)
- {
- u16 t;
- s16 xerr=0,yerr=0,delta_x,delta_y,distance;
- u16 incx,incy,uRow,uCol;
- delta_x=x2-x1;
- delta_y=y2-y1;
- uRow=x1;
- uCol=y1;
- if(delta_x>0)incx=1;
- else if(delta_x==0)incx=0;
- else { incx=-1; delta_x=-delta_x; }
-
- if(delta_y>0)incy=1;
- else if(delta_y==0)incy=0;
- else { incy=-1; delta_y=-delta_y; }
-
- if( delta_x>delta_y) distance=delta_x;
- else distance=delta_y;
-
- for(t=0;t<=distance+1;t++)
- {
- LCD_dotDraw(uRow,uCol,Color);
- xerr+=delta_x ;
- yerr+=delta_y ;
- if(xerr>distance)
- {
- xerr-=distance;
- uRow+=incx;
- }
- if(yerr>distance)
- {
- yerr-=distance;
- uCol+=incy;
- }
- }
- }

芯片解密