Example #1
0
void ili9320_vline(int ys, int ye, int x, int c)
{
    
    switch(lcd_id)
    {
        case 0x9320:
            write_reg(0x03,(0<<5)|(0<<4)|(1<<3)|(1<<12));
            write_reg(0x0020, x);
            write_reg(0x0021, ys);
            WMLCDCOM(0x0022);
            while(ys < ye)
            {
                WMLCDDATA(c);
                ys++;
            }
           // write_reg(0x03,(1<<5)|(1<<4)|(0<<3)|(1<<12));
            break;
        case 0x8989:
            write_reg(0x11,(0<<5)|(0<<4)|(1<<3));
            write_reg(0x004e, x);
            write_reg(0x004f, ys);
            WMLCDCOM(0x0022);
            while(ys < ye)
            {
            WMLCDDATA(c);
            ys++;
            }
          // write_reg(0x11,(1<<5)|(1<<4)|(0<<3));
            break;
        default:
            break;   
    }
}
Example #2
0
void ili9320_hline(int xs, int xe, int y, int c)
{
    switch(lcd_id)
    {
        case 0x9320:
            write_reg(0x03,(1<<5)|(1<<4)|(0<<3)|(1<<12));
            write_reg(0x0020, xs);
            write_reg(0x0021, y);
            WMLCDCOM(0x0022);
            while(xs < xe)
            {
                WMLCDDATA(c);
                xs++;
            }
          //  write_reg(0x03,(1<<5)|(1<<4)|(0<<3)|(1<<12));
            break;
        case 0x8989:
            write_reg(0x11,(1<<5)|(1<<4)|(0<<3));
            write_reg(0x004e, xs);
            write_reg(0x004f, y);
            WMLCDCOM(0x0022);
            while(xs < xe)
            {
            WMLCDDATA(c);
            xs++;
            }
            write_reg(0x11,(1<<5)|(1<<4)|(0<<3));
            break;
        default:
            break;   
    }
   
}
Example #3
0
int ili9325_read_pixel(int x, int y)
{
    int value;
    write_reg(0x0020, x);
    write_reg(0x0021, y);
    WMLCDCOM(0x0022);
    value = ILI9325_DATA_ADDRESS;
    WMLCDCOM(0x0022);
    value = ILI9325_DATA_ADDRESS;
    return value;
}
Example #4
0
int ili9320_read_pixel(int x, int y)
{
    int value;
    write_reg(0x0020, x);
    write_reg(0x0021, y);
    WMLCDCOM(0x0022);
    value = ILI9320_DATA_ADDRESS;
    WMLCDCOM(0x0022);
    value = ILI9320_DATA_ADDRESS;
    return LCD_BGR2RGB(value);
}
Example #5
0
void ili9325_write_pixel(int x, int y, int c)
{
    write_reg(0x0020, x);
    write_reg(0x0021, y);
    WMLCDCOM(0x0022);
    WMLCDDATA(c);
}
Example #6
0
void ili9320_write_gram(uint16_t *buf, int len)
{
    WMLCDCOM(0x0022);
    while(len--)
    {
        WMLCDDATA(*buf++);
    }
}
Example #7
0
void ili9325_clear(int c)
{
    int i;
    ili9325_set_window(0, 0, LCD_X_MAX, LCD_Y_MAX);
    WMLCDCOM(0x22);
    for(i = 0; i < (LCD_X_MAX * LCD_Y_MAX); i++)
    {
        WMLCDDATA(c);
    }
}
Example #8
0
void ili9320_write_pixel(int x, int y, int c)
{
    switch(lcd_id)
    {
        case 0x9320:
            write_reg(0x0020, x);
            write_reg(0x0021, y);
            WMLCDCOM(0x0022);
            WMLCDDATA(c);
            break;
        case 0x8989:
            write_reg(0x004e,x);        
            write_reg(0x004f,y);  
            WMLCDCOM(0x0022);
            WMLCDDATA(c);
            break;
        default:
            break;   
    }
  
}
Example #9
0
void GUI_DrawPixel(int color, int x, int y)
{
    switch(lcd_id)
    {
        case 0x9320:
            write_reg(0x0020, x);
            write_reg(0x0021, y);
            WMLCDCOM(0x0022);
            WMLCDDATA(color);
            break;
        case 0x8989:
            write_reg(0x004e,x);        
            write_reg(0x004f,y);  
            WMLCDCOM(0x0022);
            WMLCDDATA(color);
            break;
        default:
            break;   
    }
    
}
Example #10
0
void ili9320_hline(int xs, int xe, int y, int c)
{
    write_reg(0x03,(1<<5)|(1<<4)|(0<<3)|(1<<12));
    write_reg(0x0020, xs);
    write_reg(0x0021, y);
    WMLCDCOM(0x0022);
    while(xs < xe)
    {
        WMLCDDATA(c);
        xs++;
    }
}
Example #11
0
void ili9320_vline(int ys, int ye, int x, int c)
{
    write_reg(0x03,(0<<5)|(0<<4)|(1<<3)|(1<<12));
    write_reg(0x0020, x);
    write_reg(0x0021, ys);
    WMLCDCOM(0x0022);
    while(ys < ye)
    {
        WMLCDDATA(c);
        ys++;
    }
    write_reg(0x03,(1<<5)|(1<<4)|(0<<3)|(1<<12));
}
Example #12
0
static uint16_t read_reg(uint16_t addr)
{
    WMLCDCOM(addr);
    return ILI9325_DATA_ADDRESS;
}
Example #13
0
static void write_reg(uint16_t addr, uint16_t val)
{
    WMLCDCOM(addr);
    WMLCDDATA(val);
}