NET OS%206.1%20Training - PowerPoint PPT Presentation

About This Presentation
Title:

NET OS%206.1%20Training

Description:

HW manual. Auto doc: LCD driver and GUI library. Examples ... Grand Pacific Optoelectronics Corp: GPG240X320-NFPDELW3 - LG. Philips LCD Co. , Ltd: LCD130V01 ... – PowerPoint PPT presentation

Number of Views:10
Avg rating:3.0/5.0
Slides: 15
Provided by: ftp1
Category:
Tags: 20training | net | lg | manual | user

less

Transcript and Presenter's Notes

Title: NET OS%206.1%20Training


1
NETOS 6.1 Training
2
LCD Driver
3
LCD Driver
  • LCD Driver API in BSP
  • Open Sequence
  • Close Sequence
  • ioctl Requests
  • LCD_PANEL_INFO_TYPE
  • FRAME_BUFFER_TYPE
  • PALETTE_ENTRY_TYPE

4
LCD Driver API
  • open() open a display device
  • ioctl() set up/change/get display device info
  • close() close a display device
  • read()not implemented
  • write()not implemented

5
Open Sequence
  • Open the device
  • fd open ("/display/0", O_RDWR)
  • Set up the LCD display
  • retval ioctl (fd, LCD_SET_DISPLAY_TYPE, (void
    )lcdInfo)
  • Control enable
  • on 1
  • retval ioctl (fd, LCD_SET_CONTROL_ENABLE,
    (void )on)
  • Delay according to LCD data sheet
  • tx_thread_sleep (TFT_DELAY_TIME)
  • Power enable
  • on 1
  • retval ioctl (fd, LCD_SET_POWER_ENABLE, (void
    )on)

6
Close Sequence
  • Disable LCD power
  • on 0
  • ioctl (fd, LCD_SET_POWER_ENABLE, (void )on)
  • Delay according to LCD data sheet
  • tx_thread_sleep (TFT_DELAY_TIME)
  • Disable LCD control
  • on0
  • ioctl (fd, LCD_SET_CONTROL_ENABLE, (void
    )on)
  • Close device
  • close (fd)

7
ioctl Requests
  • LCD_SET_DISPLAY_TYPE
  • LCD_SET_CONTROL_ENABLE
  • LCD_SET_POWER_ENABLE
  • LCD_GET_PRIMARY_BUFFER
  • LCD_GET_CURRENT_BUFFER
  • LCD_SET_SWITCH_BUFFER
  • LCD_SET_PALETTE_ENTRY
  • LCD_GET_DISPLAY_WIDTH
  • LCD_GET_DISPLAY_HEIGHT
  • LCD_GET_DISPLAY_BPP
  • LCD_GET_DISPLAY_BYTEORDER
  • LCD_GET_DISPLAY_PIXELORDER
  • LCD_GET_DISPLAY_TYPE
  • LCD_GET_PALETTE_SIZE

8
LCD_PANEL_INFO_TYPE
  • typedef struct
  • int lcdType
  • int lcdColor
  • int lcdMono8
  • int lcdWidth
  • int lcdHeight
  • unsigned char lcdBpp
  • unsigned char lcdClockSelect
  • int lcdBypassPixelClockDivider
  • unsigned char lcdPanelClockDivisor
  • int lcdPixelOrder
  • int lcdByteOrder
  • int lcdRGB
  • unsigned char lcdHorzBackPorch
  • unsigned char lcdHorzFrontPorch
  • unsigned char lcdHorzSyncPulseWidth
  • unsigned char lcdVertBackPorch
  • unsigned char lcdVertFrontPorch

9
FRAME_BUFFER_TYPE
  • typedef struct
  • char frameBuffer
  • int frameBufferLength
  • FRAME_BUFFER_TYPE
  • frameBuffer cant be in WRITE_BACK cached memory
    region

10
PALETTE_ENTRY_TYPE
  • typedef struct
  • int paletteIndex
  • int intensity
  • unsigned char red
  • unsigned char green
  • unsigned char blue
  • PALETTE_ENTRY_TYPE

11
GUI API
  • Separate Library
  • Pixel API - put one pixel on the display
  • - dcPutPixel()
  • Bitmap API - decode and display a bitmap file
  • - dcDecodeBitmapHeader()
  • - dcDisplayBmp()
  • - dcSetUpPaletteFromBitmap

12
Double Buffering
  • Call dcPutPixel() with an user frame buffer
  • Call ioctl with request LCD_SET_SWITCH_BUFFER
  • Call dcDisplayBmp() with an user frame buffer
  • Call ioctl with request LCD_SET_SWITCH_BUFFER

13
For example dcPutPixel()
  • int dcPutPixel (
  • int fd,
  • FRAME_BUFFER_TYPE frameBuffer,
  • int x,
  • int y,
  • unsigned char red,
  • unsigned char green,
  • unsigned char blue,
  • int intensity)

14
References
  • HW manual
  • Auto doc LCD driver and GUI library
  • Examples/lcd_tft24
  • Data sheets
  • - Sharp LQ10D421
  • - Sharp LM057QC1T01
  • - Grand Pacific Optoelectronics Corp
    GPG240X320-NFPDELW3
  • - LG. Philips LCD Co. , Ltd LCD130V01
Write a Comment
User Comments (0)
About PowerShow.com