SSD1306 OLED display driver  1.5.6
This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
Public Member Functions | List of all members
NanoEngine16 Class Reference

#include <nano_engine.h>

Inheritance diagram for NanoEngine16:
NanoEngine< TILE_8x8_RGB16 > NanoEngineCore NanoEngineTiler< TILE_8x8_RGB16, W, H, B > NanoEngineInputs

Public Member Functions

 NanoEngine16 ()
 
- Public Member Functions inherited from NanoEngine< TILE_8x8_RGB16 >
 NanoEngine ()
 

Additional Inherited Members

- Static Public Member Functions inherited from NanoEngine< TILE_8x8_RGB16 >
static void display ()
 refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update the screen. Engine will update only those areas, which are marked by refresh() methods.
 
static void notify (const char *str)
 shows notification to a user for 1 seconds Shows notification to a user for 1 seconds More...
 
- Static Public Member Functions inherited from NanoEngineCore
static void begin ()
 
static void setFrameRate (uint8_t fps)
 
static uint8_t getFrameRate ()
 
static uint8_t getCpuLoad ()
 
static bool nextFrame ()
 
static void loopCallback (TLoopCallback callback)
 
- Static Public Member Functions inherited from NanoEngineInputs
static bool pressed (uint8_t buttons)
 Returns true if button or specific combination of buttons is not pressed. Returns true if button or specific combination of buttons is pressed. More...
 
static bool notPressed (uint8_t buttons)
 Returns true if button or specific combination of buttons is not pressed. Returns true if button or specific combination of buttons is not pressed. More...
 
static uint8_t buttonsState ()
 Returns bits of all pressed buttons Returns bits of all pressed buttons.
 
static void connectCustomKeys (TNanoEngineGetButtons handler)
 
static void connectZKeypad (uint8_t analogPin)
 Enables engine to use Z-Keypad. Enables engine to use Z-Keypad. Please refer to arkanoid example for schematics. More...
 
static void connectArduboyKeys ()
 Configures NanoEngine8 to use Arduboy keys layout. Configures NanoEngine8 to use Arduboy keys layout.
 
- Static Public Member Functions inherited from NanoEngineTiler< TILE_8x8_RGB16, W, H, B >
static void refresh ()
 
static void refresh (const NanoRect &rect)
 
static void refresh (const NanoPoint &point)
 
static void refresh (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 
static void drawCallback (TNanoEngineOnDraw callback)
 
static bool collision (NanoPoint &p, NanoRect &rect)
 Returns true if point is inside the rectangle area. Returns true if point is inside the rectangle area. More...
 
- Static Public Attributes inherited from NanoEngineTiler< TILE_8x8_RGB16, W, H, B >
static const uint8_t NE_TILE_SIZE_BITS
 
static const uint8_t NE_TILE_WIDTH
 
static const uint8_t NE_TILE_HEIGHT
 
static const uint8_t NE_MAX_TILES_NUM
 
static TILE_8x8_RGB16 canvas
 
- Protected Member Functions inherited from NanoEngineInputs
 NanoEngineInputs ()
 
- Protected Member Functions inherited from NanoEngineTiler< TILE_8x8_RGB16, W, H, B >
 NanoEngineTiler ()
 
- Static Protected Member Functions inherited from NanoEngineTiler< TILE_8x8_RGB16, W, H, B >
static void displayBuffer ()
 refreshes content on oled display. Refreshes content on oled display. Call it, if you want to update the screen. Engine will update only those areas, which are marked by refresh() methods.
 
static void displayPopup (const char *msg)
 prints popup message over display content prints popup message over display content More...
 
- Static Protected Attributes inherited from NanoEngineCore
static uint8_t m_frameDurationMs
 
static uint8_t m_fps
 
static uint8_t m_cpuLoad
 
static uint32_t m_lastFrameTs
 
static TLoopCallback m_loop
 
- Static Protected Attributes inherited from NanoEngineInputs
static TNanoEngineGetButtons m_onButtons
 
- Static Protected Attributes inherited from NanoEngineTiler< TILE_8x8_RGB16, W, H, B >
static uint16_t m_refreshFlags [NE_MAX_TILES_NUM]
 
static TNanoEngineOnDraw m_onDraw
 

Detailed Description

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 97 of file nano_engine.h.

Constructor & Destructor Documentation

NanoEngine16::NanoEngine16 ( )
inline

Creates new Graphics Engine object.

Definition at line 103 of file nano_engine.h.


The documentation for this class was generated from the following file: