Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: TouchPanel.cpp
- Revision:
- 1:e7ae315a1ceb
- Parent:
- 0:55a3f0eda74d
- Child:
- 2:a31069f27cd5
--- a/TouchPanel.cpp Sat Sep 14 11:40:09 2013 +0000
+++ b/TouchPanel.cpp Sat Sep 14 11:48:46 2013 +0000
@@ -23,7 +23,7 @@
*_cs = 1;
}
-int Touch::RD_AD(void)
+int Touch::RDAD(void)
{
unsigned short buf,temp;
@@ -36,41 +36,41 @@
return buf;
}
-int Touch::Read_X(void)
+int Touch::ReadX(void)
{
int i;
*_cs=0;
wait(0.000001);
_spi->write(CHX);
wait(0.000001);
- i=RD_AD();
+ i=RDAD();
*_cs=1;
return i;
}
-int Touch::Read_Y(void)
+int Touch::ReadY(void)
{
int i;
*_cs=0;
wait(0.000001);
_spi->write(CHY);
wait(0.000001);
- i=RD_AD();
+ i=RDAD();
*_cs=1;
return i;
}
-void Touch::TP_GetAdXY(int *x,int *y)
+void Touch::GetAdXY(int *x,int *y)
{
int adx,ady;
- adx=Read_X();
+ adx=ReadX();
wait(0.000001);
- ady=Read_Y();
+ ady=ReadY();
*x=adx;
*y=ady;
}
-void Touch::TP_DrawPoint(int Xpos,int Ypos)
+void Touch::DrawPoint(int Xpos,int Ypos)
{
_lcd->DrawPixel(Xpos,Ypos,COLOR_BLUE);
_lcd->DrawPixel(Xpos+1,Ypos,COLOR_BLUE);
@@ -98,7 +98,7 @@
_lcd->DrawLine(Xpos+15,Ypos-15,Xpos+15,Ypos-7,RGB(184,158,131));
}
-Coordinate *Touch::Read_Ads7846(void)
+Coordinate *Touch::ReadAds7846(void)
{
static Coordinate screen;
int m0,m1,m2,TP_X[1],TP_Y[1],temp[3];
@@ -107,7 +107,7 @@
do
{
- TP_GetAdXY(TP_X,TP_Y);
+ GetAdXY(TP_X,TP_Y);
buffer[0][count]=TP_X[0];
buffer[1][count]=TP_Y[0];
count++;
@@ -212,7 +212,7 @@
DrawCross(DisplaySample[i].x,DisplaySample[i].y);
do
{
- Ptr=Read_Ads7846();
+ Ptr=ReadAds7846();
}
while( Ptr == (void*)0 );
ScreenSample[i].x= Ptr->x; ScreenSample[i].y= Ptr->y;