ISF15ACP4 Driver 1.0.0
API reference
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
isf15acp4::ssd1331 Namespace Reference

Classes

struct  InitStep
 One initialization command with optional trailing data bytes. More...
 

Enumerations

enum class  Command : uint8_t {
  SetColumnAddress = 0x15 , SetRowAddress = 0x75 , SetContrastA = 0x81 , SetContrastB = 0x82 ,
  SetContrastC = 0x83 , SecondPrechargeA = 0x8A , SecondPrechargeB = 0x8B , SecondPrechargeC = 0x8C ,
  MasterCurrent = 0x87 , RemapColorDepth = 0xA0 , SetDisplayStartLine = 0xA1 , SetDisplayOffset = 0xA2 ,
  NormalDisplay = 0xA4 , AllPixelsOnMax = 0xA5 , AllPixelsOnMin = 0xA6 , InverseDisplay = 0xA7 ,
  SetMultiplexRatio = 0xA8 , DimModeSetting = 0xAB , MasterConfig = 0xAD , DisplayOff = 0xAE ,
  DisplayOn = 0xAF , PowerSave = 0xB0 , PhasePeriod = 0xB1 , DisplayClockDiv = 0xB3 ,
  LinearGrayScale = 0xB9 , PrechargeLevel = 0xBB , Vcomh = 0xBE , DrawLine = 0x21 ,
  DimWindow = 0x24 , ClearWindow = 0x25 , DrawRectangle = 0x22 , Copy = 0x23 ,
  FillEnable = 0x26 , ScrollSetup = 0x27 , DeactivateScroll = 0x2E , ActivateScroll = 0x2F ,
  NopBd = 0xBD , NopBc = 0xBC , NopE3 = 0xE3
}
 SSD1331 command opcodes used by NKK application notes. More...
 

Functions

const InitStep * GetInitTableIsf15acp4 (std::size_t &count) noexcept
 Factory initialization table for ISF15ACP4 (96x64 frameless).
 
const InitStep * GetInitTableIsc15anp4 (std::size_t &count) noexcept
 Initialization table for ISC15ANP4 (64x48 pushbutton).
 
const InitStep * GetInitTableIsc01p (std::size_t &count) noexcept
 Initialization table for ISC01P (52x36 display).
 
constexpr uint16_t ToPanelPixel (Color565 color) noexcept
 Convert an RGB565 colour to the 16-bit pixel word the NKK panels expect in display RAM.
 
const InitStep * GetInitTable (ProductVariant variant, std::size_t &count) noexcept
 Resolve initialization table for a product variant.
 

Variables

constexpr uint32_t kResetPulseMinUs = 3
 Minimum RES# low pulse width (SSD1331 rev 1.2 Table 18; NKK power ON sequence).
 
constexpr uint32_t kResetRecoveryUs = 10
 Wait after releasing RES# before the first command.
 
constexpr uint32_t kMaxSpiClockHz = 6'600'000
 Maximum SPI clock per datasheet (6.6 MHz).
 

Enumeration Type Documentation

◆ Command

enum class isf15acp4::ssd1331::Command : uint8_t
strong

SSD1331 command opcodes used by NKK application notes.

Enumerator
SetColumnAddress 
SetRowAddress 
SetContrastA 
SetContrastB 
SetContrastC 
SecondPrechargeA 
SecondPrechargeB 
SecondPrechargeC 
MasterCurrent 
RemapColorDepth 
SetDisplayStartLine 
SetDisplayOffset 
NormalDisplay 
AllPixelsOnMax 
AllPixelsOnMin 
InverseDisplay 
SetMultiplexRatio 
DimModeSetting 
MasterConfig 
DisplayOff 
DisplayOn 
PowerSave 
PhasePeriod 
DisplayClockDiv 
LinearGrayScale 
PrechargeLevel 
Vcomh 
DrawLine 
DimWindow 
ClearWindow 
DrawRectangle 
Copy 
FillEnable 
ScrollSetup 
DeactivateScroll 
ActivateScroll 
NopBd 
NopBc 
NopE3 

Function Documentation

◆ GetInitTable()

const InitStep * isf15acp4::ssd1331::GetInitTable ( ProductVariant  variant,
std::size_t &  count 
)
inlinenoexcept

Resolve initialization table for a product variant.

◆ GetInitTableIsc01p()

const InitStep * isf15acp4::ssd1331::GetInitTableIsc01p ( std::size_t &  count)
inlinenoexcept

Initialization table for ISC01P (52x36 display).

◆ GetInitTableIsc15anp4()

const InitStep * isf15acp4::ssd1331::GetInitTableIsc15anp4 ( std::size_t &  count)
inlinenoexcept

Initialization table for ISC15ANP4 (64x48 pushbutton).

◆ GetInitTableIsf15acp4()

const InitStep * isf15acp4::ssd1331::GetInitTableIsf15acp4 ( std::size_t &  count)
inlinenoexcept

Factory initialization table for ISF15ACP4 (96x64 frameless).

Returns
Pointer to static initialization sequence (Table 3, NKK app notes).

◆ ToPanelPixel()

constexpr uint16_t isf15acp4::ssd1331::ToPanelPixel ( Color565  color)
inlineconstexprnoexcept

Convert an RGB565 colour to the 16-bit pixel word the NKK panels expect in display RAM.

The NKK init tables set A0h bit 2 = 0 (normal colour order SA, SB, SC), and the panels wire colour C to blue and colour A to red. The 65k-colour pixel word is therefore C4..C0 B5..B0 A4..A0 = blue, green, red (NKK Application Notes rev H section 9; SSD1331 rev 1.2 Table 9 and command A0h). This swaps the red and blue fields of a Color565; green stays in place. The hardware drawing commands (21h, 22h) take C, B, A separately.

Parameters
colorRGB565 colour (red in bits 15..11).
Returns
Panel pixel word (blue in bits 15..11, red in bits 4..0), sent high byte first.

Variable Documentation

◆ kMaxSpiClockHz

constexpr uint32_t isf15acp4::ssd1331::kMaxSpiClockHz = 6'600'000
inlineconstexpr

Maximum SPI clock per datasheet (6.6 MHz).

◆ kResetPulseMinUs

constexpr uint32_t isf15acp4::ssd1331::kResetPulseMinUs = 3
inlineconstexpr

Minimum RES# low pulse width (SSD1331 rev 1.2 Table 18; NKK power ON sequence).

◆ kResetRecoveryUs

constexpr uint32_t isf15acp4::ssd1331::kResetRecoveryUs = 10
inlineconstexpr

Wait after releasing RES# before the first command.

The SSD1331 reset completion time is 2 us maximum (rev 1.2 Table 18); the driver waits longer for margin.