ISF15ACP4 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions | Variables
isf15acp4_types.hpp File Reference

Public types of the ISF15ACP4 driver: errors, Result<T>, the display and button configuration, the module variants and the colour helpers. More...

#include <cstdint>
#include "isf15acp4_detail.hpp"
#include "isf15acp4_registers.hpp"
#include "isf15acp4_version.h"

Go to the source code of this file.

Classes

struct  isf15acp4::Result< T >
 The value of a call, or why there is none. More...
 
struct  isf15acp4::Result< void >
 The result of a call that returns no value. More...
 
struct  isf15acp4::Remap
 The controller settings that depend on the wiring of the panel (Remap, A0h). More...
 
struct  isf15acp4::Point
 A position in the visible area. More...
 
struct  isf15acp4::DimSettings
 Dim mode parameters (ABh): used when the display is on in dim mode (ACh). More...
 
struct  isf15acp4::Geometry
 Geometry of a module: its visible pixels inside the 96 x 64 RAM. More...
 
struct  isf15acp4::ButtonConfig
 Switch handling: polarity, debounce, long press and repeat. More...
 
struct  isf15acp4::Config
 Everything the driver sends at start-up, and its own time knobs. More...
 
class  isf15acp4::CheckedConfig
 A configuration proven valid at build time. More...
 
struct  isf15acp4::Color
 A colour as the RGB565 word every call takes: red in bits 15..11, green 10..5, blue 4..0. A strong type, so a panel word or a byte count cannot be passed by mistake (KB-CPP20-030). More...
 
struct  isf15acp4::Channels
 The red, green and blue fields of a colour (5, 6 and 5 bits). More...
 

Namespaces

namespace  isf15acp4
 The ISF15ACP4 driver: everything it declares lives here; internals in detail.
 

Enumerations

enum class  isf15acp4::Error : uint8_t {
  isf15acp4::Error::Ok = 0 , isf15acp4::Error::NotInitialized = 1 , isf15acp4::Error::InvalidArgument = 2 , isf15acp4::Error::Bus = 3 ,
  isf15acp4::Error::Timeout = 4 , isf15acp4::Error::DeviceIdMismatch , isf15acp4::Error::Crc = 6 , isf15acp4::Error::Busy = 7 ,
  isf15acp4::Error::DeviceFault = 8 , isf15acp4::Error::Unsupported = 9 , isf15acp4::Error::ScrollActive = 16 , isf15acp4::Error::ScrollNotSet = 17 ,
  isf15acp4::Error::SupplyOff = 18 , isf15acp4::Error::Locked = 19
}
 Why a call failed. Every call of the driver returns one of these in its Result. More...
 
enum class  isf15acp4::LogLevel : uint8_t { isf15acp4::LogLevel::Error = 0 , isf15acp4::LogLevel::Warning , isf15acp4::LogLevel::Info , isf15acp4::LogLevel::Debug }
 Severity passed to the optional Log() hook. More...
 
enum class  isf15acp4::Variant : uint8_t { isf15acp4::Variant::Isf15acp4 = 0 , isf15acp4::Variant::Isc15anp4 = 1 , isf15acp4::Variant::Isc01p = 2 }
 The three modules of the family; they share the controller and differ in the panel. More...
 
enum class  isf15acp4::ColorDepth : uint8_t { isf15acp4::ColorDepth::Colors256 = 0 , isf15acp4::ColorDepth::Colors65k = 1 , isf15acp4::ColorDepth::Colors65kFormat2 = 2 }
 The pixel format of GDDRAM (A0h A[7:6]). More...
 
enum class  isf15acp4::DisplayMode : uint8_t { isf15acp4::DisplayMode::Normal = 0 , isf15acp4::DisplayMode::AllOn = 1 , isf15acp4::DisplayMode::AllOff = 2 , isf15acp4::DisplayMode::Inverse = 3 }
 What the pixels show (A4h to A7h). More...
 
enum class  isf15acp4::Output : uint8_t { isf15acp4::Output::Off = 0 , isf15acp4::Output::Normal = 1 , isf15acp4::Output::Dim = 2 }
 What the panel is doing, as far as the driver knows. More...
 
enum class  isf15acp4::ScrollInterval : uint8_t { isf15acp4::ScrollInterval::Frames6 = 0 , isf15acp4::ScrollInterval::Frames10 = 1 , isf15acp4::ScrollInterval::Frames100 = 2 , isf15acp4::ScrollInterval::Frames200 = 3 }
 The time between two scroll steps (27h E). More...
 
enum class  isf15acp4::ButtonEvent : uint8_t {
  isf15acp4::ButtonEvent::None = 0 , isf15acp4::ButtonEvent::Pressed = 1 , isf15acp4::ButtonEvent::Released = 2 , isf15acp4::ButtonEvent::LongPress = 3 ,
  isf15acp4::ButtonEvent::Repeat = 4
}
 What a switch poll can report. More...
 

Functions

constexpr const char * isf15acp4::ToString (Error error) noexcept
 The name of an error, for logs.
 
constexpr Geometry isf15acp4::GeometryOf (Variant variant) noexcept
 The geometry of a module (NKK sheets: pixel format; the column origin of the smaller panels is the centred one and not given by any NKK document: not verified on hardware).
 
constexpr bool isf15acp4::HasSwitch (Variant variant) noexcept
 Whether a module has the pushbutton (the ISC01P is a display only).
 
constexpr bool isf15acp4::SameButtonConfig (const ButtonConfig &a, const ButtonConfig &b) noexcept
 Whether two switch configurations are the same, field by field.
 
constexpr Config isf15acp4::PresetFor (Variant variant) noexcept
 The working set of a module.
 
constexpr Error isf15acp4::Validate (const ButtonConfig &b) noexcept
 Check the switch configuration without touching the chip.
 
constexpr Error isf15acp4::Validate (const Config &config) noexcept
 Check a configuration without touching the chip.
 
void isf15acp4::ConfigIsInvalid () noexcept
 Reached only when a CheckedConfig is built from an invalid configuration: it is never defined, so the build fails and names it (KB-CPP20-013).
 
constexpr Color isf15acp4::MakeColor (uint8_t r, uint8_t g, uint8_t b) noexcept
 An RGB565 colour from 8-bit channels (the low bits are dropped, not rounded).
 
constexpr Channels isf15acp4::Split (Color c) noexcept
 Split an RGB565 colour.
 
constexpr const char * isf15acp4::GetDriverVersion () noexcept
 
constexpr uint32_t isf15acp4::GetDriverVersionMajor () noexcept
 
constexpr uint32_t isf15acp4::GetDriverVersionMinor () noexcept
 
constexpr uint32_t isf15acp4::GetDriverVersionPatch () noexcept
 

Variables

constexpr uint32_t isf15acp4::kButtonTimeMaxMs = 60000
 Longest button time the driver accepts, in milliseconds (keeps every difference below 2^31).
 
constexpr uint32_t isf15acp4::kWaitMaxMs = 1000
 Longest wait the driver accepts for the supply and engine times, in milliseconds.
 
constexpr uint32_t isf15acp4::kEngineSettleMaxUs = 100000
 Longest engine settle time, in microseconds.
 
constexpr Color isf15acp4::kBlack {0x0000}
 Black.
 
constexpr Color isf15acp4::kWhite {0xFFFF}
 White.
 
constexpr Color isf15acp4::kRed {0xF800}
 Pure red.
 
constexpr Color isf15acp4::kGreen {0x07E0}
 Pure green.
 
constexpr Color isf15acp4::kBlue {0x001F}
 Pure blue.
 

Detailed Description

Public types of the ISF15ACP4 driver: errors, Result<T>, the display and button configuration, the module variants and the colour helpers.

Everything here is plain data with no platform dependency. Config{} describes the ISF15ACP4 (96 x 64 pixels) with the controller settings the module is driven with; PresetFor() gives the two smaller modules of the family. The controller has no readable register, so none of these values can be confirmed from the chip: they are what the driver sends (docs/contract.md). The start-up values of each module are the ones in NKK's application notes for the OLED Color SmartDisplay: Table 1 (ISC15ANP4), Table 2 (ISC01P) and Table 3 (ISF15ACP4), steps 4.1 to 4.18. NKK Note 1: changing those set-up values may damage the OLED module. None has been tried on a panel here.