Esempio n. 1
0
/* Performance function that works with an external buffer
   note that by and bheight are in 4-pixel units! */
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
                         int x, int by, int width, int bheight, int stride)
{
    stride <<= 2; /* 4 pixels per block */
    while (bheight--)
    {
        lcd_write_reg_ex(LCD_CNTL_PAGE, by++, -1);
        lcd_write_reg_ex(LCD_CNTL_COLUMN, x, -1);
        lcd_send_cmd(LCD_CNTL_DATA_WRITE);
        lcd_grey_data(values, phases, width);
        values += stride;
        phases += stride;
    }
}
/* Performance function that works with an external buffer
   note that bx and bwidth are in 8-pixel units! */
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
                         int bx, int y, int bwidth, int height, int stride)
{
#if (NUM_CORES > 1) && defined(HAVE_BACKLIGHT_INVERSION)
    corelock_lock(&cl);
#endif
    while (height--)
    {
        lcd_cmd_and_data(R_RAM_ADDR_SET, (y++ << 5) + addr_offset - bx);
        lcd_prepare_cmd(R_RAM_DATA);
        lcd_grey_data(values, phases, bwidth);
        values += stride;
        phases += stride;
    }
#if (NUM_CORES > 1) && defined(HAVE_BACKLIGHT_INVERSION)
    corelock_unlock(&cl);
#endif
}