Documentation ¶
Index ¶
- Constants
- func RGBATo565(c color.RGBA) uint16
- type Config
- type Device
- func (d *Device) Configure(config Config)
- func (d *Device) Display() error
- func (d *Device) DrawFastHLine(x0, x1, y int16, c color.RGBA) error
- func (d *Device) DrawFastVLine(x, y0, y1 int16, c color.RGBA) error
- func (d *Device) DrawRGBBitmap(x, y int16, data []uint16, w, h int16) error
- func (d *Device) DrawRectangle(x, y, w, h int16, c color.RGBA) error
- func (d *Device) FillRectangle(x, y, width, height int16, c color.RGBA) error
- func (d *Device) FillScreen(c color.RGBA)
- func (d *Device) GetRotation() Rotation
- func (d *Device) SetPixel(x, y int16, c color.RGBA)
- func (d *Device) SetRotation(rotation Rotation)
- func (d *Device) SetScroll(line int16)
- func (d *Device) SetScrollArea(topFixedArea, bottomFixedArea int16)
- func (d *Device) Size() (x, y int16)
- func (d *Device) StopScroll()
- type Rotation
Constants ¶
View Source
const ( TFTWIDTH = 240 ///< ILI9341 max TFT width TFTHEIGHT = 320 ///< ILI9341 max TFT height NOP = 0x00 ///< No-op register SWRESET = 0x01 ///< Software reset register RDDID = 0x04 ///< Read display identification information RDDST = 0x09 ///< Read Display Status SLPIN = 0x10 ///< Enter Sleep Mode SLPOUT = 0x11 ///< Sleep Out PTLON = 0x12 ///< Partial Mode ON NORON = 0x13 ///< Normal Display Mode ON RDMODE = 0x0A ///< Read Display Power Mode RDMADCTL = 0x0B ///< Read Display MADCTL RDPIXFMT = 0x0C ///< Read Display Pixel Format RDIMGFMT = 0x0D ///< Read Display Image Format RDSELFDIAG = 0x0F ///< Read Display Self-Diagnostic Result INVOFF = 0x20 ///< Display Inversion OFF INVON = 0x21 ///< Display Inversion ON GAMMASET = 0x26 ///< Gamma Set DISPOFF = 0x28 ///< Display OFF DISPON = 0x29 ///< Display ON CASET = 0x2A ///< Column Address Set PASET = 0x2B ///< Page Address Set RAMWR = 0x2C ///< Memory Write RAMRD = 0x2E ///< Memory Read PTLAR = 0x30 ///< Partial Area VSCRDEF = 0x33 ///< Vertical Scrolling Definition MADCTL = 0x36 ///< Memory Access Control VSCRSADD = 0x37 ///< Vertical Scrolling Start Address PIXFMT = 0x3A ///< COLMOD: Pixel Format Set FRMCTR1 = 0xB1 ///< Frame Rate Control (In Normal Mode/Full Colors) FRMCTR2 = 0xB2 ///< Frame Rate Control (In Idle Mode/8 colors) FRMCTR3 = 0xB3 ///< Frame Rate control (In Partial Mode/Full Colors) INVCTR = 0xB4 ///< Display Inversion Control DFUNCTR = 0xB6 ///< Display Function Control PWCTR1 = 0xC0 ///< Power Control 1 PWCTR2 = 0xC1 ///< Power Control 2 PWCTR3 = 0xC2 ///< Power Control 3 PWCTR4 = 0xC3 ///< Power Control 4 PWCTR5 = 0xC4 ///< Power Control 5 VMCTR1 = 0xC5 ///< VCOM Control 1 VMCTR2 = 0xC7 ///< VCOM Control 2 RDID1 = 0xDA ///< Read ID 1 RDID2 = 0xDB ///< Read ID 2 RDID3 = 0xDC ///< Read ID 3 RDID4 = 0xDD ///< Read ID 4 GMCTRP1 = 0xE0 ///< Positive Gamma Correction GMCTRN1 = 0xE1 ///< Negative Gamma Correction MADCTL_MY = 0x80 ///< Bottom to top MADCTL_MX = 0x40 ///< Right to left MADCTL_MV = 0x20 ///< Reverse Mode MADCTL_ML = 0x10 ///< LCD refresh Bottom to top MADCTL_RGB = 0x00 ///< Red-Green-Blue pixel order MADCTL_BGR = 0x08 ///< Blue-Green-Red pixel order MADCTL_MH = 0x04 ///< LCD refresh right to left )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) DrawFastHLine ¶
DrawFastHLine draws a horizontal line faster than using SetPixel
func (*Device) DrawFastVLine ¶
DrawFastVLine draws a vertical line faster than using SetPixel
func (*Device) DrawRGBBitmap ¶
func (*Device) DrawRectangle ¶
DrawRectangle fills a rectangle at a given coordinates with a color
func (*Device) FillRectangle ¶
FillRectangle fills a rectangle at a given coordinates with a color
func (*Device) FillScreen ¶
FillScreen fills the screen with a given color
func (*Device) GetRotation ¶
func (*Device) SetRotation ¶
SetRotation changes the rotation of the device (clock-wise)
func (*Device) SetScroll ¶ added in v0.11.0
SetScroll sets the vertical scroll address of the display.
func (*Device) SetScrollArea ¶ added in v0.11.0
SetScrollWindow sets an area to scroll with fixed top and bottom parts of the display
func (*Device) StopScroll ¶ added in v0.11.0
func (d *Device) StopScroll()
SpotScroll returns the display to its normal state
Click to show internal directories.
Click to hide internal directories.