#include “mbed.h”
#include “TS_DISCO_F429ZI.h”
#include “LCD_DISCO_F429ZI.h”
LCD_DISCO_F429ZI lcd1;
TS_DISCO_F429ZI ts;
TS_StateTypeDef TS_State;
int main()
{
uint16_t x, y;
uint8_t text[30];
/* ...Code to display initial message omitted ...*/
/* .... Code to initial and test status omitted. ...*/
uint32_t q1color = 0xFFFF00FF;
lcd1.Clear(q1color);
wait(2);
sprintf((char*)text, "Max (x,y) = (%d, %d) ", lcd1.GetXSize(), lcd1.GetYSize() );
lcd1.DisplayStringAt(0 ,LINE(12),(uint8_t*) &text, RIGHT_MODE);
while(1)
{
ts.GetState(&TS_State);
if (TS_State.TouchDetected)
{
x = TS_State.X;
y = TS_State.Y;
sprintf((char*)text, "x=%d y=%d ", x, y);
lcd1.DisplayStringAt(0, LINE(4), (uint8_t *) &text, CENTER_MODE);
}
}
}
Hey here is a code for a simple x,y display. I was wondering how would I be able to make the 4 quadrants on the screen be different colors?