/ software / apps / colour_terminal / tmds_encode_font_2bpp.h
tmds_encode_font_2bpp.h
 1  #ifndef _TMDS_ENCODE_FONT_2BPP_H
 2  #define _TMDS_ENCODE_FONT_2BPP_H
 3  
 4  #include "pico/types.h"
 5  
 6  // Render characters using an 8px-wide font and a per-character 2bpp
 7  // foreground/background colour. This function is fast enough to run 3 times
 8  // per scanline on one core, so RGB222 coloured text can be rendered (with
 9  // separate R/G/B colour planes).
10  //
11  // charbuf: pointer to the row of characters (8 bits each) for the current
12  // scanline (byte-aligned)
13  //
14  // colourbuf: pointer to a list of 2bpp foreground/background colour pairs for
15  // each character (word-aligned, least-significant first within each word)
16  //
17  // font_line: pointer to list of 8 pixel bitmaps, each representing the
18  // intersection of a font character with the current scanline. (byte-aligned)
19  
20  void tmds_encode_font_2bpp(const uint8_t *charbuf, const uint32_t	*colourbuf,
21  	uint32_t *tmdsbuf, uint n_pix, const uint8_t *font_line);
22  
23  #endif