SSD1306 OLED display driver 1.8.2 This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

Static Public Member Functions | Static Protected Attributes | List of all members
NanoEngineCore Class Reference

`#include <core.h>`

Inheritance diagram for NanoEngineCore:

## Static Public Member Functions
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. More...
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 void | connectGpioKeypad (const uint8_t *gpioKeys)
| Enables engine to use GPIO keys. More...

## Static Protected Attributes
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

## Additional Inherited Members
Protected Member Functions inherited from NanoEngineInputs
| NanoEngineInputs ()

## Detailed Description

Nano Engine Core class, contains generic frame-rate control functions

Definition at line 171 of file core.h.

## Member Function Documentation

## ◆ begin()

static void NanoEngineCore::begin | ( |  | ) |
| static

Initializes internal timestamps.

## ◆ getCpuLoad()

static uint8_t NanoEngineCore::getCpuLoad | ( |  | ) |
| inlinestatic

Returns cpu load in percents [0-255]. 100 means maximum normal CPU load. 0 means, CPU has nothing to do. >100 means that CPU is not enough to perform all operations

Definition at line 199 of file core.h.

## ◆ getFrameRate()

static uint8_t NanoEngineCore::getFrameRate | ( |  | ) |
| inlinestatic

Returns current frame rate

Definition at line 191 of file core.h.

## ◆ loopCallback()

static void NanoEngineCore::loopCallback | ( | TLoopCallback | callback | ) |
| inlinestatic

Sets user-defined loop callback. This callback will be called once every time new frame needs to be refreshed on oled display.

Definition at line 210 of file core.h.

## ◆ nextFrame()

static bool NanoEngineCore::nextFrame | ( |  | ) |
| static

Returns true if it is time to render next frame

## ◆ setFrameRate()

static void NanoEngineCore::setFrameRate | ( | uint8_t | fps | ) |
| static

Sets working frame-rate for the engine

Parameters

  fps | - frame rate to set between [1-255]

## Member Data Documentation

## ◆ m_cpuLoad

uint8_t NanoEngineCore::m_cpuLoad
| staticprotected

Current cpu load in percents

Definition at line 219 of file core.h.

## ◆ m_fps

uint8_t NanoEngineCore::m_fps
| staticprotected

Current fps

Definition at line 217 of file core.h.

## ◆ m_frameDurationMs

uint8_t NanoEngineCore::m_frameDurationMs
| staticprotected

Duration between frames in milliseconds

Definition at line 210 of file core.h.

## ◆ m_lastFrameTs

uint32_t NanoEngineCore::m_lastFrameTs
| staticprotected

Last timestamp in milliseconds the frame was updated on oled display

Definition at line 221 of file core.h.

## ◆ m_loop

TLoopCallback NanoEngineCore::m_loop
| staticprotected

Callback to call before starting oled update

Definition at line 223 of file core.h.

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

- nano_engine/core.h