const char image[] =
{
0xFF,0xFE................
...........................
........................
}
const char image[] =
{
R1,G1,B1................
...........................
........................
}
const char image[] =
{
0xFF,0xFE................
...........................
........................
}
const char image[] =
{
0xFFEE,0xFE12,0x4587,................
...........................
........................
}
const unsigned char bmp[] = {
0xffee,0x125F,...........
...............................
...............................
}
void drawpicture()
{
unsigned int i,j;
unsigned long int val=0;
LCD_win(0,0,319,239);
LCDCommand(0x22);
TFT_CS = 0;
for(i=0;i<240;i++)
{
for(j=0;j<320;j++)
{
GPIO_PORTJ_DATA_R = bmp[val]/0X100;
TFT_WR = 0;
TFT_WR = 1;
GPIO_PORTJ_DATA_R = bmp[val]%0X100;
TFT_WR = 0;
TFT_WR = 1;
val++;
}
}
TFT_CS =1;
const unsigned char bmp[] = {
0xff,0x12,0x45,0xf5,...........
...............................
...............................
}
void drawpicture()
{
unsigned int i,j;
unsigned long int val=0;
LCD_win(0,0,319,239);
LCDCommand(0x22);
TFT_CS = 0;
for(i=0;i<240;i++)
{
for(j=0;j<320;j++)
{
GPIO_PORTJ_DATA_R = bmp[val];
TFT_WR = 0;
TFT_WR = 1;
val++;
}
}
TFT_CS = 1;
const unsigned char bmp[] = {
0xff,0x12,0x45,0xf5,...........
...............................
...............................
}
void drawpicture()
{
unsigned int i,j;
unsigned long int val=0;
unsigned char r,g,b;
LCD_win(0,0,319,239);
LCDCommand(0x22);
TFT_CS = 0;
for(i=0;i<240;i++)
{
for(j=0;j<320;j++)
{
r=bmp[val++];
g=bmp[val++];
b=bmp[val++];
// if you have wrong color change with
// b=bmp[val++];
// g=bmp[val++];
// r=bmp[val++];
GPIO_PORTJ_DATA_R = ((r & 0xf8) | (g >>5));
TFT_WR = 0;
TFT_WR = 1;
GPIO_PORTJ_DATA_R = ( (b & 0x1f) | ( (g & 0x1c)<<3) );
TFT_WR = 0;
TFT_WR = 1;
}
}
TFT_CS = 1;
#define Black 0x0000
#define Maroon 0x8000
#define Olive 0x8400
#define Navy 0x0010
#define Purple 0x8010
#define White 0xFFFF
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?