![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Final
Dependencies: IRremote HCSR04 TB6612FNG
Diff: oled/gfxfont.h
- Revision:
- 97:59d348745d96
diff -r ec3a2da01f40 -r 59d348745d96 oled/gfxfont.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/oled/gfxfont.h Sun Jun 16 04:51:51 2019 +0000 @@ -0,0 +1,26 @@ +// Font structures for newer Adafruit_GFX (1.1 and later). +// Example fonts are included in 'Fonts' directory. +// To use a font in your Arduino sketch, #include the corresponding .h +// file and pass address of GFXfont struct to setFont(). Pass NULL to +// revert to 'classic' fixed-space bitmap font. + +#ifndef _GFXFONT_H_ +#define _GFXFONT_H_ + +#include <stdint.h> + +typedef struct { // Data stored PER GLYPH + uint16_t bitmapOffset; // Pointer into GFXfont->bitmap + uint8_t width, height; // Bitmap dimensions in pixels + uint8_t xAdvance; // Distance to advance cursor (x axis) + int8_t xOffset, yOffset; // Dist from cursor pos to UL corner +} GFXglyph; + +typedef struct { // Data stored for FONT AS A WHOLE: + uint8_t *bitmap; // Glyph bitmaps, concatenated + GFXglyph *glyph; // Glyph array + uint8_t first, last; // ASCII extents + uint8_t yAdvance; // Newline distance (y axis) +} GFXfont; + +#endif // _GFXFONT_H_