Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SainSmartTFT18LCD

Implements

Index

Constructors

constructor

  • Returns SainSmartTFT18LCD

Properties

color

debugprint

debugprint: boolean = false

height

height: number = 0

io_cs

io_dc

io_res

io_res: PeripheralIO

keys

keys: string[]

obniz

obniz: Obniz

params

params: any

requiredKeys

requiredKeys: string[]

spi

width

width: number = 0

writeBuffer

writeBuffer: number[] = []

Methods

_deadSleep

  • _deadSleep(waitMsec: number): void
  • Parameters

    • waitMsec: number

    Returns void

_initG

  • _initG(): void
  • Returns void

_reset

  • _reset(): void
  • Returns void

_setPresetColor

  • _setPresetColor(): void
  • Returns void

_writeBuffer

  • _writeBuffer(data?: number[]): void
  • Parameters

    • Optional data: number[]

    Returns void

_writeFlush

  • _writeFlush(): void
  • Returns void

asyncwait

  • asyncwait(): Promise<number[]>
  • Returns Promise<number[]>

color16

  • color16(r: number, g: number, b: number): RGB16
  • Parameters

    • r: number
    • g: number
    • b: number

    Returns RGB16

drawChar

  • drawChar(x: number, y: number, char: string, color: RGB16, backgroundColor: RGB16, size?: undefined | number): void
  • Parameters

    • x: number
    • y: number
    • char: string
    • color: RGB16
    • backgroundColor: RGB16
    • Optional size: undefined | number

    Returns void

drawCircle

  • drawCircle(center_x: number, center_y: number, radius: number, color: RGB16): void
  • Parameters

    • center_x: number
    • center_y: number
    • radius: number
    • color: RGB16

    Returns void

drawContext

  • drawContext(context: CanvasRenderingContext2D, gray: boolean): void
  • Parameters

    • context: CanvasRenderingContext2D
    • gray: boolean

    Returns void

drawContextBound

  • drawContextBound(context: CanvasRenderingContext2D, x0: number, y0: number, width: number, height: number, x1: number, y1: number, gray: boolean): void
  • Parameters

    • context: CanvasRenderingContext2D
    • x0: number
    • y0: number
    • width: number
    • height: number
    • x1: number
    • y1: number
    • gray: boolean

    Returns void

drawHLine

  • drawHLine(x: number, y: number, width: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • color: RGB16

    Returns void

drawLine

  • drawLine(x0: number, y0: number, x1: number, y1: number, color: RGB16): void
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number
    • color: RGB16

    Returns void

drawPixel

  • drawPixel(x: number, y: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • color: RGB16

    Returns void

drawRect

  • drawRect(x: number, y: number, width: number, height: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • color: RGB16

    Returns void

drawRoundRect

  • drawRoundRect(x: number, y: number, width: number, height: number, round: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • round: number
    • color: RGB16

    Returns void

drawString

  • drawString(x: number, y: number, string: string, color: RGB16, backgroundColor: RGB16, size?: undefined | number, wrap?: undefined | false | true): [number, number]
  • Parameters

    • x: number
    • y: number
    • string: string
    • color: RGB16
    • backgroundColor: RGB16
    • Optional size: undefined | number
    • Optional wrap: undefined | false | true

    Returns [number, number]

drawTriangle

  • drawTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, color: RGB16): void
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • color: RGB16

    Returns void

drawVLine

  • drawVLine(x: number, y: number, height: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • height: number
    • color: RGB16

    Returns void

fillCircle

  • fillCircle(center_x: number, center_y: number, radius: number, color: RGB16): void
  • Parameters

    • center_x: number
    • center_y: number
    • radius: number
    • color: RGB16

    Returns void

fillRect

  • fillRect(x: number, y: number, width: number, height: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • color: RGB16

    Returns void

fillRoundRect

  • fillRoundRect(x: number, y: number, width: number, height: number, round: number, color: RGB16): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • round: number
    • color: RGB16

    Returns void

fillScreen

  • fillScreen(color: RGB16): void
  • Parameters

    Returns void

fillTriangle

  • fillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, color: RGB16): void
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • color: RGB16

    Returns void

init

  • init(): void
  • Returns void

print_debug

  • print_debug(v: any): void
  • Parameters

    • v: any

    Returns void

raw

  • raw(pixels: RGB24[]): void
  • Parameters

    Returns void

rawBound

  • rawBound(x: number, y: number, width: number, height: number, pixels: RGB24[]): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • pixels: RGB24[]

    Returns void

setAddrWindow

  • setAddrWindow(x0: number, y0: number, x1: number, y1: number): void
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns void

setDisplay

  • setDisplay(on: boolean): void
  • Parameters

    • on: boolean

    Returns void

setDisplayOff

  • setDisplayOff(): void
  • Returns void

setDisplayOn

  • setDisplayOn(): void
  • Returns void

setInversion

  • setInversion(inversion: boolean): void
  • Parameters

    • inversion: boolean

    Returns void

setInversionOff

  • setInversionOff(): void
  • Returns void

setInversionOn

  • setInversionOn(): void
  • Returns void

setRotation

  • setRotation(m: number): void
  • Parameters

    • m: number

    Returns void

wired

  • wired(obniz: Obniz): void
  • Parameters

    Returns void

write

  • write(cmd: number, data: number[]): void
  • Parameters

    • cmd: number
    • data: number[]

    Returns void

writeCommand

  • writeCommand(cmd: number): void
  • Parameters

    • cmd: number

    Returns void

writeData

  • writeData(data: number[]): void
  • Parameters

    • data: number[]

    Returns void

Static info

  • Returns ObnizPartsInfo

Generated using TypeDoc