Repo for ESP32 Weather Station Development
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

689 lines
22KB

  1. /*
  2. * High level TFT functions
  3. * Author: LoBo 04/2017, https://github/loboris
  4. *
  5. */
  6. #ifndef _TFT_H_
  7. #define _TFT_H_
  8. #include <stdlib.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include "tftspi.h"
  13. typedef struct {
  14. uint16_t x1;
  15. uint16_t y1;
  16. uint16_t x2;
  17. uint16_t y2;
  18. } dispWin_t;
  19. typedef struct {
  20. uint8_t *font;
  21. uint8_t x_size;
  22. uint8_t y_size;
  23. uint8_t offset;
  24. uint16_t numchars;
  25. uint16_t size;
  26. uint8_t max_x_size;
  27. uint8_t bitmap;
  28. color_t color;
  29. } Font;
  30. //==========================================================================================
  31. // ==== Global variables ===================================================================
  32. //==========================================================================================
  33. extern uint8_t tft_orientation; // current screen tft_orientation
  34. extern uint16_t tft_font_rotate; // current font tft_font_rotate angle (0~395)
  35. extern uint8_t tft_font_transparent; // if not 0 draw fonts transparent
  36. extern uint8_t tft_font_forceFixed; // if not zero force drawing proportional fonts with fixed width
  37. extern uint8_t tft_font_buffered_char;
  38. extern uint8_t tft_font_line_space; // additional spacing between text lines; added to font height
  39. extern uint8_t tft_text_wrap; // if not 0 wrap long text to the new line, else clip
  40. extern color_t tft_fg; // current foreground color for fonts
  41. extern color_t tft_bg; // current background for non transparent fonts
  42. extern dispWin_t tft_dispWin; // display clip window
  43. extern float tft_angleOffset; // angle offset for arc, polygon and line by angle functions
  44. extern uint8_t tft_image_debug; // print debug messages during image decode if set to 1
  45. extern Font tft_cfont; // Current font structure
  46. extern int tft_x; // X position of the next character after TFT_print() function
  47. extern int tft_y; // Y position of the next character after TFT_print() function
  48. extern uint32_t tft_tp_calx; // touch screen X calibration constant
  49. extern uint32_t tft_tp_caly; // touch screen Y calibration constant
  50. // =========================================================================================
  51. // Buffer is created during jpeg decode for sending data
  52. // Total size of the buffer is 2 * (JPG_IMAGE_LINE_BUF_SIZE * 3)
  53. // The size must be multiple of 256 bytes !!
  54. #define JPG_IMAGE_LINE_BUF_SIZE 512
  55. // --- Constants for ellipse function ---
  56. #define TFT_ELLIPSE_UPPER_RIGHT 0x01
  57. #define TFT_ELLIPSE_UPPER_LEFT 0x02
  58. #define TFT_ELLIPSE_LOWER_LEFT 0x04
  59. #define TFT_ELLIPSE_LOWER_RIGHT 0x08
  60. // Constants for Arc function
  61. // number representing the maximum angle (e.g. if 100, then if you pass in start=0 and end=50, you get a half circle)
  62. // this can be changed with setArcParams function at runtime
  63. #define DEFAULT_ARC_ANGLE_MAX 360
  64. // rotational offset in degrees defining position of value 0 (-90 will put it at the top of circle)
  65. // this can be changed with setAngleOffset function at runtime
  66. #define DEFAULT_ANGLE_OFFSET -90
  67. #define PI 3.14159265359
  68. #define MIN_POLIGON_SIDES 3
  69. #define MAX_POLIGON_SIDES 60
  70. // === Color names constants ===
  71. extern const color_t TFT_BLACK;
  72. extern const color_t TFT_NAVY;
  73. extern const color_t TFT_DARKGREEN;
  74. extern const color_t TFT_DARKCYAN;
  75. extern const color_t TFT_MAROON;
  76. extern const color_t TFT_PURPLE;
  77. extern const color_t TFT_OLIVE;
  78. extern const color_t TFT_LIGHTGREY;
  79. extern const color_t TFT_DARKGREY;
  80. extern const color_t TFT_BLUE;
  81. extern const color_t TFT_GREEN;
  82. extern const color_t TFT_CYAN;
  83. extern const color_t TFT_RED;
  84. extern const color_t TFT_MAGENTA;
  85. extern const color_t TFT_YELLOW;
  86. extern const color_t TFT_WHITE;
  87. extern const color_t TFT_ORANGE;
  88. extern const color_t TFT_GREENYELLOW;
  89. extern const color_t TFT_PINK;
  90. // === Color invert constants ===
  91. #define INVERT_ON 1
  92. #define INVERT_OFF 0
  93. // === Special coordinates constants ===
  94. #define CENTER -9003
  95. #define RIGHT -9004
  96. #define BOTTOM -9004
  97. #define LASTX 7000
  98. #define LASTY 8000
  99. // === Embedded fonts constants ===
  100. #define DEFAULT_FONT 0
  101. #define DEJAVU18_FONT 1
  102. #define DEJAVU24_FONT 2
  103. #define UBUNTU16_FONT 3
  104. #define COMIC24_FONT 4
  105. #define MINYA24_FONT 5
  106. #define TOONEY32_FONT 6
  107. #define SMALL_FONT 7
  108. #define DEF_SMALL_FONT 8
  109. #define FONT_7SEG 9
  110. #define USER_FONT 10 // font will be read from file
  111. // ===== PUBLIC FUNCTIONS =========================================================================
  112. /*
  113. * Draw pixel at given x,y coordinates
  114. *
  115. * Params:
  116. * x: horizontal position
  117. * y: vertical position
  118. * color: pixel color
  119. * sel: if not 0 activate CS before and deactivat after sending pixel data to display
  120. * when sending multiple pixels it is faster to activate the CS first,
  121. * send all pixels an deactivate CS after all pixela was sent
  122. */
  123. //-------------------------------------------------------------------
  124. void TFT_drawPixel(int16_t x, int16_t y, color_t color, uint8_t sel);
  125. /*
  126. * Read pixel color value from display GRAM at given x,y coordinates
  127. *
  128. * Params:
  129. * x: horizontal position
  130. * y: vertical position
  131. *
  132. * Returns:
  133. * pixel color at x,y
  134. */
  135. //------------------------------------------
  136. color_t TFT_readPixel(int16_t x, int16_t y);
  137. /*
  138. * Draw vertical line at given x,y coordinates
  139. *
  140. * Params:
  141. * x: horizontal start position
  142. * y: vertical start position
  143. * h: line height in pixels
  144. * color: line color
  145. */
  146. //---------------------------------------------------------------------
  147. void TFT_drawFastVLine(int16_t x, int16_t y, int16_t h, color_t color);
  148. /*
  149. * Draw horizontal line at given x,y coordinates
  150. *
  151. * Params:
  152. * x: horizontal start position
  153. * y: vertical start position
  154. * w: line width in pixels
  155. * color: line color
  156. */
  157. //---------------------------------------------------------------------
  158. void TFT_drawFastHLine(int16_t x, int16_t y, int16_t w, color_t color);
  159. /*
  160. * Draw line on screen
  161. *
  162. * Params:
  163. * x0: horizontal start position
  164. * y0: vertical start position
  165. * x1: horizontal end position
  166. * y1: vertical end position
  167. * color: line color
  168. */
  169. //-------------------------------------------------------------------------------
  170. void TFT_drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, color_t color);
  171. /*
  172. * Draw line on screen from (x,y) point at given angle
  173. * Line drawing angle starts at lower right quadrant of the screen and is offseted by
  174. * 'tft_angleOffset' global variable (default: -90 degrees)
  175. *
  176. * Params:
  177. * x: horizontal start position
  178. * y: vertical start position
  179. * start: start offset from (x,y)
  180. * len: length of the line
  181. * angle: line angle in degrees
  182. * color: line color
  183. */
  184. //-----------------------------------------------------------------------------------------------------------
  185. void TFT_drawLineByAngle(uint16_t x, uint16_t y, uint16_t start, uint16_t len, uint16_t angle, color_t color);
  186. /*
  187. * Fill given rectangular screen region with color
  188. *
  189. * Params:
  190. * x: horizontal rect start position
  191. * y: vertical rect start position
  192. * w: rectangle width
  193. * h: rectangle height
  194. * color: fill color
  195. */
  196. //---------------------------------------------------------------------------
  197. void TFT_fillRect(int16_t x, int16_t y, int16_t w, int16_t h, color_t color);
  198. /*
  199. * Draw rectangle on screen
  200. *
  201. * Params:
  202. * x: horizontal rect start position
  203. * y: vertical rect start position
  204. * w: rectangle width
  205. * h: rectangle height
  206. * color: rect line color
  207. */
  208. //------------------------------------------------------------------------------
  209. void TFT_drawRect(uint16_t x1,uint16_t y1,uint16_t w,uint16_t h, color_t color);
  210. /*
  211. * Draw rectangle with rounded corners on screen
  212. *
  213. * Params:
  214. * x: horizontal rect start position
  215. * y: vertical rect start position
  216. * w: rectangle width
  217. * h: rectangle height
  218. * r: corner radius
  219. * color: rectangle color
  220. */
  221. //----------------------------------------------------------------------------------------------
  222. void TFT_drawRoundRect(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t r, color_t color);
  223. /*
  224. * Fill given rectangular screen region with rounded corners with color
  225. *
  226. * Params:
  227. * x: horizontal rect start position
  228. * y: vertical rect start position
  229. * w: rectangle width
  230. * h: rectangle height
  231. * r: corner radius
  232. * color: fill color
  233. */
  234. //----------------------------------------------------------------------------------------------
  235. void TFT_fillRoundRect(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t r, color_t color);
  236. /*
  237. * Fill the whole screen with color
  238. *
  239. * Params:
  240. * color: fill color
  241. */
  242. //--------------------------------
  243. void TFT_fillScreen(color_t color);
  244. /*
  245. * Fill the current clip window with color
  246. *
  247. * Params:
  248. * color: fill color
  249. */
  250. //---------------------------------
  251. void TFT_fillWindow(color_t color);
  252. /*
  253. * Draw triangle on screen
  254. *
  255. * Params:
  256. * x0: first triangle point x position
  257. * y0: first triangle point y position
  258. * x0: second triangle point x position
  259. * y0: second triangle point y position
  260. * x0: third triangle point x position
  261. * y0: third triangle point y position
  262. * color: triangle color
  263. */
  264. //-----------------------------------------------------------------------------------------------------------------
  265. void TFT_drawTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, color_t color);
  266. /*
  267. * Fill triangular screen region with color
  268. *
  269. * Params:
  270. * x0: first triangle point x position
  271. * y0: first triangle point y position
  272. * x0: second triangle point x position
  273. * y0: second triangle point y position
  274. * x0: third triangle point x position
  275. * y0: third triangle point y position
  276. * color: fill color
  277. */
  278. //-----------------------------------------------------------------------------------------------------------------
  279. void TFT_fillTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, color_t color);
  280. /*
  281. * Draw circle on screen
  282. *
  283. * Params:
  284. * x: circle center x position
  285. * y: circle center x position
  286. * r: circle radius
  287. * color: circle color
  288. */
  289. //-------------------------------------------------------------------
  290. void TFT_drawCircle(int16_t x, int16_t y, int radius, color_t color);
  291. /*
  292. * Fill circle on screen with color
  293. *
  294. * Params:
  295. * x: circle center x position
  296. * y: circle center x position
  297. * r: circle radius
  298. * color: circle fill color
  299. */
  300. //-------------------------------------------------------------------
  301. void TFT_fillCircle(int16_t x, int16_t y, int radius, color_t color);
  302. /*
  303. * Draw ellipse on screen
  304. *
  305. * Params:
  306. * x0: ellipse center x position
  307. * y0: ellipse center x position
  308. * rx: ellipse horizontal radius
  309. * ry: ellipse vertical radius
  310. * option: drawing options, multiple options can be combined
  311. 1 (TFT_ELLIPSE_UPPER_RIGHT) draw upper right corner
  312. 2 (TFT_ELLIPSE_UPPER_LEFT) draw upper left corner
  313. 4 (TFT_ELLIPSE_LOWER_LEFT) draw lower left corner
  314. 8 (TFT_ELLIPSE_LOWER_RIGHT) draw lower right corner
  315. to draw the whole ellipse use option value 15 (1 | 2 | 4 | 8)
  316. *
  317. * color: circle color
  318. */
  319. //------------------------------------------------------------------------------------------------------
  320. void TFT_drawEllipse(uint16_t x0, uint16_t y0, uint16_t rx, uint16_t ry, color_t color, uint8_t option);
  321. /*
  322. * Fill elliptical region on screen
  323. *
  324. * Params:
  325. * x0: ellipse center x position
  326. * y0: ellipse center x position
  327. * rx: ellipse horizontal radius
  328. * ry: ellipse vertical radius
  329. * option: drawing options, multiple options can be combined
  330. 1 (TFT_ELLIPSE_UPPER_RIGHT) fill upper right corner
  331. 2 (TFT_ELLIPSE_UPPER_LEFT) fill upper left corner
  332. 4 (TFT_ELLIPSE_LOWER_LEFT) fill lower left corner
  333. 8 (TFT_ELLIPSE_LOWER_RIGHT) fill lower right corner
  334. to fill the whole ellipse use option value 15 (1 | 2 | 4 | 8)
  335. *
  336. * color: fill color
  337. */
  338. //------------------------------------------------------------------------------------------------------
  339. void TFT_fillEllipse(uint16_t x0, uint16_t y0, uint16_t rx, uint16_t ry, color_t color, uint8_t option);
  340. /*
  341. * Draw circle arc on screen
  342. * Arc drawing angle starts at lower right quadrant of the screen and is offseted by
  343. * 'tft_angleOffset' global variable (default: -90 degrees)
  344. *
  345. * Params:
  346. * cx: arc center X position
  347. * cy: arc center Y position
  348. * th: thickness of the drawn arc
  349. * ry: arc vertical radius
  350. * start: arc start angle in degrees
  351. * end: arc end angle in degrees
  352. * color: arc outline color
  353. * fillcolor: arc fill color
  354. */
  355. //----------------------------------------------------------------------------------------------------------------------------
  356. void TFT_drawArc(uint16_t cx, uint16_t cy, uint16_t r, uint16_t th, float start, float end, color_t color, color_t fillcolor);
  357. /*
  358. * Draw polygon on screen
  359. *
  360. * Params:
  361. * cx: polygon center X position
  362. * cy: arc center Y position
  363. * sides: number of polygon sides; MAX_POLIGON_SIDES ~ MAX_POLIGON_SIDES (3 ~ 60)
  364. * diameter: diameter of the circle inside which the polygon is drawn
  365. * color: polygon outline color
  366. * fill: polygon fill color; if same as color, polygon is not filled
  367. * deg: polygon rotation angle; 0 ~ 360
  368. * th: thickness of the polygon outline
  369. */
  370. //--------------------------------------------------------------------------------------------------------------
  371. void TFT_drawPolygon(int cx, int cy, int sides, int diameter, color_t color, color_t fill, int deg, uint8_t th);
  372. //--------------------------------------------------------------------------------------
  373. //void TFT_drawStar(int cx, int cy, int diameter, color_t color, bool fill, float factor);
  374. /*
  375. * Set the font used for writing the text to display.
  376. *
  377. * ------------------------------------------------------------------------------------
  378. * For 7 segment font only characters 0,1,2,3,4,5,6,7,8,9, . , - , : , / are available.
  379. * Character ‘/‘ draws the degree sign.
  380. * ------------------------------------------------------------------------------------
  381. *
  382. * Params:
  383. * font: font number; use defined font names
  384. * font_file: pointer to font file name; NULL for embeded fonts
  385. */
  386. //----------------------------------------------------
  387. void TFT_setFont(uint8_t font, const char *font_file);
  388. /*
  389. * Returns current font height & width in pixels.
  390. *
  391. * Params:
  392. * width: pointer to returned font width
  393. * height: pointer to returned font height
  394. */
  395. //-------------------------------------------
  396. int TFT_getfontsize(int *width, int* height);
  397. /*
  398. * Returns current font height in pixels.
  399. *
  400. */
  401. //----------------------
  402. int TFT_getfontheight();
  403. /*
  404. * Write text to display.
  405. *
  406. * Rotation of the displayed text depends on 'tft_font_rotate' variable (0~360)
  407. * if 'tft_font_transparent' variable is set to 1, no background pixels will be printed
  408. *
  409. * If the text does not fit the screen width it will be clipped (if tft_text_wrap=0),
  410. * or continued on next line (if tft_text_wrap=1)
  411. *
  412. * Two special characters are allowed in strings:
  413. * ‘\r’ CR (0x0D), clears the display to EOL
  414. * ‘\n’ LF (ox0A), continues to the new line, x=0
  415. *
  416. * Params:
  417. * st: pointer to null terminated string to be printed
  418. * x: horizontal position of the upper left point in pixels
  419. * Special values can be entered:
  420. * CENTER, centers the text
  421. * RIGHT, right justifies the text
  422. * LASTX, continues from last X position; offset can be used: LASTX+n
  423. * y: vertical position of the upper left point in pixels
  424. * Special values can be entered:
  425. * CENTER, centers the text
  426. * BOTTOM, bottom justifies the text
  427. * LASTY, continues from last Y position; offset can be used: LASTY+n
  428. *
  429. */
  430. //-------------------------------------
  431. void TFT_print(char *st, int x, int y);
  432. /*
  433. * Set atributes for 7 segment vector font
  434. * == 7 segment font must be the current font to this function to have effect ==
  435. *
  436. * Params:
  437. * l: 6~40; distance between bars in pixels
  438. * w: 1~12, max l/2; bar width in pixels
  439. * outline: draw font outline if set to 1
  440. * color: font outline color, only used if outline=1
  441. *
  442. */
  443. //-------------------------------------------------------------------------
  444. void set_7seg_font_atrib(uint8_t l, uint8_t w, int outline, color_t color);
  445. /*
  446. * Sets the clipping area coordinates.
  447. * All writing to screen is clipped to that area.
  448. * Starting x & y in all functions will be adjusted to the clipping area.
  449. *
  450. * Params:
  451. * x1,y1: upper left point of the clipping area
  452. * x2,y2: bottom right point of the clipping area
  453. *
  454. */
  455. //----------------------------------------------------------------------
  456. void TFT_setclipwin(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
  457. /*
  458. * Resets the clipping area to full screen (0,0),(_wodth,tft_height)
  459. *
  460. */
  461. //----------------------
  462. void TFT_resetclipwin();
  463. /*
  464. * Save current clipping area to temporary variable
  465. *
  466. */
  467. //---------------------
  468. void TFT_saveClipWin();
  469. /*
  470. * Restore current clipping area from temporary variable
  471. *
  472. */
  473. //------------------------
  474. void TFT_restoreClipWin();
  475. /*
  476. * Set the screen rotation
  477. * Also resets the clip window and clears the screen with current background color
  478. *
  479. * Params:
  480. * rot: 0~3; screen rotation; use defined rotation constants:
  481. * PORTRAIT, LANDSCAPE, PORTRAIT_FLIP, LANDSCAPE_FLIP
  482. *
  483. */
  484. //--------------------------------
  485. void TFT_setRotation(uint8_t rot);
  486. /*
  487. * Set inverted/normal colors
  488. *
  489. * Params:
  490. * mode: 0 or 1; use defined constants: INVERT_ON or INVERT_OFF
  491. *
  492. */
  493. //-----------------------------------------
  494. void TFT_invertDisplay(const uint8_t mode);
  495. /*
  496. * Select gamma curve
  497. * Params:
  498. * gamma: gama curve, values 0~3
  499. */
  500. //=================================
  501. void TFT_setGammaCurve(uint8_t gm);
  502. /*
  503. * Compare two color structures
  504. * Returns 0 if equal, 1 if not equal
  505. *
  506. * Params:
  507. * c1, c2: colors to be compared
  508. */
  509. //---------------------------------------------
  510. int TFT_compare_colors(color_t c1, color_t c2);
  511. /*
  512. * returns the string width in pixels.
  513. * Useful for positions strings on the screen.
  514. */
  515. //--------------------------------
  516. int TFT_getStringWidth(char* str);
  517. /*
  518. * Fills the rectangle occupied by string with current background color
  519. */
  520. void TFT_clearStringRect(int x, int y, char *str);
  521. /*
  522. * Converts the components of a color, as specified by the HSB model,
  523. * to an equivalent set of values for the default RGB model.
  524. * The color structure that is returned by HSBtoRGB encodes the value of a color as R, G & B component
  525. *
  526. * Params:
  527. * _hue: float; any number, the floor of this number is subtracted from it to create a fraction between 0 and 1.
  528. * This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.
  529. * _sat: float; 0 ~ 1.0
  530. * _brightness: float; 0 ~ 1.0
  531. *
  532. */
  533. //----------------------------------------------------------
  534. color_t HSBtoRGB(float _hue, float _sat, float _brightness);
  535. /*
  536. * Decodes and displays JPG image
  537. * Limits:
  538. * Baseline only. Progressive and Lossless JPEG format are not supported.
  539. * Image size: Up to 65520 x 65520 pixels
  540. * Color space: YCbCr three components only. Gray scale image is not supported.
  541. * Sampling factor: 4:4:4, 4:2:2 or 4:2:0.
  542. *
  543. * Params:
  544. * x: image left position; constants CENTER & RIGHT can be used; negative value is accepted
  545. * y: image top position; constants CENTER & BOTTOM can be used; negative value is accepted
  546. * scale: image scale factor: 0~3; if scale>0, image is scaled by factor 1/(2^scale) (1/2, 1/4 or 1/8)
  547. * fname: pointer to the name of the file from which the image will be read
  548. * if set to NULL, image will be read from memory buffer pointed to by 'buf'
  549. * buf: pointer to the memory buffer from which the image will be read; used if fname=NULL
  550. * size: size of the memory buffer from which the image will be read; used if fname=NULL & buf!=NULL
  551. *
  552. */
  553. //-----------------------------------------------------------------------------------
  554. void TFT_jpg_image(int x, int y, uint8_t scale, char *fname, uint8_t *buf, int size);
  555. /*
  556. * Decodes and displays BMP image
  557. * Only uncompressed RGB 24-bit with no color space information BMP images can be displayed
  558. *
  559. * Params:
  560. * x: image left position; constants CENTER & RIGHT can be used; negative value is accepted
  561. * y: image top position; constants CENTER & BOTTOM can be used; negative value is accepted
  562. * scale: image scale factor: 0~7; if scale>0, image is scaled by factor 1/(scale+1)
  563. * fname: pointer to the name of the file from which the image will be read
  564. * if set to NULL, image will be read from memory buffer pointed to by 'imgbuf'
  565. * imgbuf: pointer to the memory buffer from which the image will be read; used if fname=NULL
  566. * size: size of the memory buffer from which the image will be read; used if fname=NULL & imgbuf!=NULL
  567. *
  568. */
  569. //-------------------------------------------------------------------------------------
  570. int TFT_bmp_image(int x, int y, uint8_t scale, char *fname, uint8_t *imgbuf, int size);
  571. /*
  572. * Get the touch panel coordinates.
  573. * The coordinates are adjusted to screen tft_orientation if raw=0
  574. *
  575. * Params:
  576. * x: pointer to X coordinate
  577. * y: pointer to Y coordinate
  578. * raw: if 0 returns calibrated screen coordinates; if 1 returns raw touch controller coordinates
  579. *
  580. * Returns:
  581. * 0 if touch panel is not touched; x=y=0
  582. * 1 if touch panel is touched; x&y are the valid coordinates
  583. */
  584. //----------------------------------------------
  585. int TFT_read_touch(int *x, int* y, uint8_t raw);
  586. /*
  587. * Compile font c source file to .fnt file
  588. * which can be used in TFT_setFont() function to select external font
  589. * Created file have the same name as source file and extension .fnt
  590. *
  591. * Params:
  592. * fontfile: pointer to c source font file name; must have .c extension
  593. * dbg: if set to 1, prints debug information
  594. *
  595. * Returns:
  596. * 0 on success
  597. * err no on error
  598. *
  599. */
  600. //------------------------------------------------
  601. int compile_font_file(char *fontfile, uint8_t dbg);
  602. /*
  603. * Get all font's characters to buffer
  604. */
  605. void getFontCharacters(uint8_t *buf);
  606. #endif
  607. #ifdef __cplusplus
  608. }
  609. #endif