LCDGFX LCD display driver  1.1.5
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
NANO_ENGINE: Nano Engine description

Nano Engine description. More...

Classes

class  AdafruitCanvasOps< BPP >
 
class  NanoCanvasOps< BPP >
 
struct  _NanoPoint
 
struct  _NanoRect
 
class  NanoEngine1_8< D >
 
class  NanoMenuItem< T >
 
class  NanoTextMenuItem< T >
 
class  NanoObjectList< T >
 
class  NanoSprite< T >
 

Typedefs

template<class D >
using NanoEngine1 = NanoEngine< TILE_16x16_MONO, D >
 
template<class D >
using NanoEngine4 = NanoEngine< TILE_16x16_GRAY4, D >
 
template<class D >
using NanoEngine8 = NanoEngine< TILE_16x16_RGB8, D >
 
template<class D >
using NanoEngine16 = NanoEngine< TILE_16x16_RGB16, D >
 
#define SSD1306_MORE_CHARS_REQUIRED   0xffff
 
NanoFont g_canvas_font
 
typedef struct _NanoPoint NanoPoint
 
typedef struct _NanoRect NanoRect
 
typedef uint8_t(* TNanoEngineGetButtons) (void)
 
typedef void(* TLoopCallback) (void)
 
#define ENGINE_DEFAULT_FPS   (15)
 
enum  {
  BUTTON_NONE = 0B00000000, BUTTON_DOWN = 0B00000001, BUTTON_LEFT = 0B00000010, BUTTON_RIGHT = 0B00000100,
  BUTTON_UP = 0B00001000, BUTTON_A = 0B00010000, BUTTON_B = 0B00100000, BUTTON_C = 0B01000000,
  BUTTON_CENTER = 0B10000000
}
 
typedef bool(* TNanoEngineOnDraw) (void)
 
#define NE_MAX_TILE_ROWS   20
 Maximum tile rows supported. Can be defined outside the library.
 
#define TILE_128x64_MONO   NanoCanvas<128, 64, 1>
 Full-screen 1-bit tile for SSD1306. More...
 
#define TILE_8x8_MONO   NanoCanvas<8, 8, 1>
 Standard 1-bit tile 8x8 for monochrome mode.
 
#define TILE_16x16_MONO   NanoCanvas<16, 16, 1>
 Standard 1-bit tile 16x16 for monochrome mode.
 
#define TILE_32x32_MONO   NanoCanvas<32, 32, 1>
 Standard 1-bit tile 32x32 for monochrome mode.
 
#define TILE_16x16_GRAY4   NanoCanvas<16, 16, 4>
 Standard 4-bit tile 16x16 for gray-color displays.
 
#define TILE_8x8_RGB8   NanoCanvas<8, 8, 8>
 Standard 8-bit RGB tile 8x8.
 
#define TILE_16x16_RGB8   NanoCanvas<16, 16, 8>
 Standard 8-bit RGB tile 16x16.
 
#define TILE_32x32_RGB8   NanoCanvas<32, 32, 8>
 Standard 8-bit RGB tile 32x32.
 
#define TILE_8x8_MONO_8   NanoCanvas<8, 8, 1>
 Standard 1-bit tile 8x8 for RGB mode.
 
#define TILE_16x16_MONO_8   NanoCanvas<16, 16, 1>
 Standard 1-bit tile 16x16 for RGB mode.
 
#define TILE_8x8_RGB16   NanoCanvas<8, 8, 16>
 Standard 16-bit RGB tile 8x8.
 
#define TILE_16x16_RGB16   NanoCanvas<16, 16, 16>
 Standard 16-bit RGB tile 16x16.
 
#define ADATILE_8x8_MONO   AdafruitCanvas1, 8, 8, 3
 Use Adafruit GFX implementation as NanoEngine canvas.
 
#define ADATILE_8x8_RGB8   AdafruitCanvas8, 8, 8, 3
 Use Adafruit GFX implementation as NanoEngine canvas.
 
#define ADATILE_8x8_RGB16   AdafruitCanvas16, 8, 8, 3
 Use Adafruit GFX implementation as NanoEngine canvas.
 

Detailed Description

Nano Engine description.

This group contains API functions for developing Graphics engines.

Macro Definition Documentation

◆ ENGINE_DEFAULT_FPS

#define ENGINE_DEFAULT_FPS   (15)

Defaut frame rate for all engines

Definition at line 40 of file core.h.

◆ SSD1306_MORE_CHARS_REQUIRED

#define SSD1306_MORE_CHARS_REQUIRED   0xffff

Flag means that more chars are required to decode utf-8

Definition at line 39 of file font.h.

◆ TILE_128x64_MONO

#define TILE_128x64_MONO   NanoCanvas<128, 64, 1>

Full-screen 1-bit tile for SSD1306.

Structure, holding currently set font.

Warning
Only for internal use.

Definition at line 52 of file tiler.h.

Typedef Documentation

◆ NanoEngine1

template<class D >
using NanoEngine1 = NanoEngine<TILE_16x16_MONO, D>

NanoEngine1 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1306 oled display needs at least 128x64/8 bytes (1024 bytes), and this is inacceptable for microcontrollers like attiny85 (it has only 512B of RAM). So, to workaround issue with low resources, NanoEngine1 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine1 on simple controllers. If tile size is 32x32, then 128x64 oled display is devided into 8 tiles:
[0,0] [1,0] [2,0], [3,0]
[0,1] [1,1] [2,1], [3,1]
In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display.

Warning
Works only in SSD1306 compatible mode

Definition at line 64 of file nano_engine_v2.h.

◆ NanoEngine16

template<class D >
using NanoEngine16 = NanoEngine<TILE_16x16_RGB16, D>

NanoEngine16 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1351 oled display needs at least 128x128x2 bytes (32768 bytes), and this is inacceptable for microcontrollers like atmega328p (it has only 2KiB of RAM). So, to workaround issue with low resources, NanoEngine16 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine16 on simple controllers. If tile size is 16x16, then 128x128 oled display is devided into 64 tiles:
[0,0] [1,0] [2,0] [3,0] [4,0] [5,0] [6,0] [7,0]
[0,1] [1,1] [2,1] [3,1] [4,1] [5,1] [6,1] [7,1]
etc.
In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display.

Definition at line 140 of file nano_engine_v2.h.

◆ NanoEngine4

template<class D >
using NanoEngine4 = NanoEngine<TILE_16x16_GRAY4, D>

NanoEngine4 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1327 oled display needs at least 128x128x/2 bytes (8192 bytes), and this is inacceptable for microcontrollers like atmega328p (it has only 2KiB of RAM). So, to workaround issue with low resources, NanoEngine4 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine4 on simple controllers. For example, if tile size is 32x32, then 128x128 oled display is devided into 16 tiles:
[0,0] [1,0] [2,0] [3,0]
[0,1] [1,1] [2,1] [3,1]
[0,2] [1,2] [2,2] [3,2]
[0,3] [1,3] [2,3] [3,3]
In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display.

Definition at line 82 of file nano_engine_v2.h.

◆ NanoEngine8

template<class D >
using NanoEngine8 = NanoEngine<TILE_16x16_RGB8, D>

NanoEngine8 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1331 oled display needs at least 96x64x1 bytes (6144 bytes), and this is inacceptable for microcontrollers like atmega328p (it has only 2KiB of RAM). So, to workaround issue with low resources, NanoEngine8 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine8 on simple controllers. If tile size is 32x32, then 96x64 oled display is devided into 6 tiles:
[0,0] [1,0] [2,0]
[0,1] [1,1] [2,1]
In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display.

Definition at line 98 of file nano_engine_v2.h.

◆ NanoPoint

typedef struct _NanoPoint NanoPoint

Describes point

◆ NanoRect

typedef struct _NanoRect NanoRect

NanoRect structure describes rectangle area.

◆ TLoopCallback

typedef void(* TLoopCallback) (void)

Type of user-specified loop callback

Definition at line 46 of file core.h.

◆ TNanoEngineGetButtons

typedef uint8_t(* TNanoEngineGetButtons) (void)

Type of user-specified keyboard callback

Definition at line 43 of file core.h.

◆ TNanoEngineOnDraw

typedef bool(* TNanoEngineOnDraw) (void)

Type of user-specified draw callback.

Definition at line 75 of file tiler.h.