예제 #1
0
void lcd_display_char(unsigned int x, unsigned int y,
                      unsigned int font_color, unsigned int bg_color, char ch)
{
    unsigned char font;
    int index = (int) ch;
    
    for (int i = 0; i < FONT_HEIGHT; ++i, ++y) {
        font = courier_font[index][i];
        for (int j = 0, k = x; j < FONT_WIDTH; ++j, ++k) {
            if (font & 0x80) lcd_write_pixel(k, y, font_color);
            else lcd_write_pixel(k, y, bg_color);
            font <<= 1;
        }
    }
    
    return;
}
	void lcd_write_pixels(const ui::Color* const pixels, size_t n) {
		for(size_t i=0; i<n; i++) {
			lcd_write_pixel(pixels[i]);
		}
	}