Prusa MINI Firmware overview
window_term.h File Reference
#include "window.h"
#include "term.h"

Go to the source code of this file.

Classes

struct  _window_class_term_t
 
struct  _window_term_t
 

Typedefs

typedef struct _window_class_term_t window_class_term_t
 
typedef struct _window_term_t window_term_t
 

Functions

void render_term (rect_ui16_t rc, term_t *pt, font_t *font, color_t clr0, color_t clr1)
 

Variables

const window_class_term_t window_class_term
 

Typedef Documentation

◆ window_class_term_t

◆ window_term_t

typedef struct _window_term_t window_term_t

Function Documentation

◆ render_term()

void render_term ( rect_ui16_t  rc,
term_t pt,
font_t font,
color_t  clr0,
color_t  clr1 
)
13  {
14  uint8_t char_w = font->w;
15  uint8_t char_h = font->h;
16  if (pt && (pt->flg & TERM_FLG_CHANGED)) {
17  uint8_t cols = pt->cols;
18  uint8_t rows = pt->rows;
19  uint8_t *pb = pt->buff;
20  uint8_t *pm = pt->buff + (cols * rows * 2);
21  uint8_t msk = 0x01;
22  uint8_t c;
23  uint8_t r;
24  int i = 0;
25  for (r = 0; r < rows; r++)
26  for (c = 0; c < cols; c++) {
27  if ((*pm) & msk) {
28  //character is followed by attribut
29  uint8_t ch = *(pb++);
30  pb++; //uint8_t attr = *(pb++);
31  display->draw_char(point_ui16(rc.x + c * char_w, rc.y + r * char_h), ch, font, clr0, clr1);
32  } else
33  pb += 2;
34  i++;
35  msk <<= 1;
36  if ((i & 7) == 0) {
37  *pm = 0;
38  pm++;
39  msk = 0x01;
40  }
41  }
42  } else
43  display->fill_rect(rc, clr0);
44 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ window_class_term

const window_class_term_t window_class_term
_rect_ui16_t::y
uint16_t y
Definition: guitypes.h:71
_font_t::h
uint8_t h
Definition: guitypes.h:78
_term_t::rows
uint8_t rows
Definition: term.h:45
_display_t::draw_char
display_draw_char_t * draw_char
Definition: display.h:34
TERM_FLG_CHANGED
#define TERM_FLG_CHANGED
Definition: term.h:29
i
uint8_t i
Definition: screen_test_graph.c:72
_display_t::fill_rect
display_fill_rect_t * fill_rect
Definition: display.h:33
_term_t::cols
uint8_t cols
Definition: term.h:44
_term_t::flg
uint16_t flg
Definition: term.h:46
_font_t::w
uint8_t w
Definition: guitypes.h:77
uint8_t
const uint8_t[]
Definition: 404_html.c:3
display
display_t * display
Definition: display.c:6
_rect_ui16_t::x
uint16_t x
Definition: guitypes.h:70
_term_t::buff
uint8_t * buff
Definition: term.h:47
point_ui16
static point_ui16_t point_ui16(uint16_t x, uint16_t y)
Definition: guitypes.h:154