38 #ifndef __DRIVERLIB_LCD_H__ 39 #define __DRIVERLIB_LCD_H__ 69 #define PAL_FROM_RGB(ui32RGBColor) (((ui32RGBColor & 0xF0) >> 4) | \ 70 ((ui32RGBColor & 0xF000) >> 8) | \ 71 ((ui32RGBColor & 0xF00000) >> 12)) 85 #define CYCLES_FROM_TIME_US(ui32ClockFreq, ui32Time_uS) \ 86 (((ui32Time_uS) == 0) ? 0 : \ 87 (((ui32ClockFreq) / 1000000) * ((((ui32Time_uS) * 1000) - 1) / 1000)) + 1) 101 #define CYCLES_FROM_TIME_NS(ui32ClockFreq, ui32Time_nS) \ 102 (((ui32Time_nS) == 0) ? 0 : \ 103 ((((((ui32ClockFreq) / 1000000) * ((ui32Time_nS) - 1)) / 1000)) + 1)) 173 #define RASTER_TIMING_SYNCS_OPPOSITE_PIXCLK \ 175 #define RASTER_TIMING_SYNCS_ON_RISING_PIXCLK \ 177 #define RASTER_TIMING_SYNCS_ON_FALLING_PIXCLK \ 179 #define RASTER_TIMING_ACTIVE_HIGH_OE \ 181 #define RASTER_TIMING_ACTIVE_LOW_OE \ 183 #define RASTER_TIMING_ACTIVE_HIGH_PIXCLK \ 185 #define RASTER_TIMING_ACTIVE_LOW_PIXCLK \ 187 #define RASTER_TIMING_ACTIVE_HIGH_HSYNC \ 189 #define RASTER_TIMING_ACTIVE_LOW_HSYNC \ 191 #define RASTER_TIMING_ACTIVE_HIGH_VSYNC \ 193 #define RASTER_TIMING_ACTIVE_LOW_VSYNC \ 281 #define LCD_MODE_LIDD ((uint8_t)0x00) 282 #define LCD_MODE_RASTER ((uint8_t)0x01) 283 #define LCD_MODE_AUTO_UFLOW_RESTART \ 291 #define LIDD_CONFIG_SYNC_MPU68 0x00000000 292 #define LIDD_CONFIG_ASYNC_MPU68 0x00000001 293 #define LIDD_CONFIG_SYNC_MPU80 0x00000002 294 #define LIDD_CONFIG_ASYNC_MPU80 0x00000003 295 #define LIDD_CONFIG_ASYNC_HITACHI \ 297 #define LIDD_CONFIG_INVERT_ALE 0x00000008 298 #define LIDD_CONFIG_INVERT_RS_EN \ 300 #define LIDD_CONFIG_INVERT_WS_DIR \ 302 #define LIDD_CONFIG_INVERT_CS0 0x00000040 303 #define LIDD_CONFIG_INVERT_CS1 0x00000080 315 #define RASTER_FMT_ACTIVE_24BPP_PACKED \ 317 #define RASTER_FMT_ACTIVE_24BPP_UNPACKED \ 319 #define RASTER_FMT_ACTIVE_PALETTIZED_12BIT \ 321 #define RASTER_FMT_ACTIVE_PALETTIZED_16BIT \ 323 #define RASTER_FMT_PASSIVE_MONO_4PIX \ 325 #define RASTER_FMT_PASSIVE_MONO_8PIX \ 327 #define RASTER_FMT_PASSIVE_PALETTIZED \ 329 #define RASTER_FMT_PASSIVE_COLOR_12BIT \ 331 #define RASTER_FMT_PASSIVE_COLOR_16BIT \ 333 #define RASTER_ACTVID_DURING_BLANK \ 335 #define RASTER_NIBBLE_MODE_ENABLED \ 337 #define RASTER_LOAD_DATA_ONLY 0x00200000 338 #define RASTER_LOAD_PALETTE_ONLY \ 340 #define RASTER_READ_ORDER_REVERSED \ 350 #define LCD_INT_DMA_DONE 0x00000001 351 #define LCD_INT_RASTER_FRAME_DONE \ 353 #define LCD_INT_SYNC_LOST 0x00000004 354 #define LCD_INT_AC_BIAS_CNT 0x00000008 355 #define LCD_INT_UNDERFLOW 0x00000020 356 #define LCD_INT_PAL_LOAD 0x00000040 357 #define LCD_INT_EOF0 0x00000100 358 #define LCD_INT_EOF1 0x00000200 365 #define LCD_DMA_FIFORDY_8_WORDS 0x00000000 366 #define LCD_DMA_FIFORDY_16_WORDS \ 368 #define LCD_DMA_FIFORDY_32_WORDS \ 370 #define LCD_DMA_FIFORDY_64_WORDS \ 372 #define LCD_DMA_FIFORDY_128_WORDS \ 374 #define LCD_DMA_FIFORDY_256_WORDS \ 376 #define LCD_DMA_FIFORDY_512_WORDS \ 378 #define LCD_DMA_BURST_1 0x00000010 379 #define LCD_DMA_BURST_2 0x00000010 380 #define LCD_DMA_BURST_4 0x00000020 381 #define LCD_DMA_BURST_8 0x00000030 382 #define LCD_DMA_BURST_16 0x00000040 383 #define LCD_DMA_BYTE_ORDER_0123 0x00000000 384 #define LCD_DMA_BYTE_ORDER_1023 0x00000008 385 #define LCD_DMA_BYTE_ORDER_3210 0x00000002 386 #define LCD_DMA_BYTE_ORDER_2301 0x0000000A 387 #define LCD_DMA_PING_PONG 0x00000001 394 #define LCD_PALETTE_TYPE_1BPP 0x00000000 395 #define LCD_PALETTE_TYPE_2BPP 0x00001000 396 #define LCD_PALETTE_TYPE_4BPP 0x00002000 397 #define LCD_PALETTE_TYPE_8BPP 0x00003000 398 #define LCD_PALETTE_TYPE_DIRECT 0x00004000 399 #define LCD_PALETTE_SRC_24BIT 0x80000000 406 #define LCD_CLOCK_MAIN 0x00000008 407 #define LCD_CLOCK_DMA 0x00000004 408 #define LCD_CLOCK_LIDD 0x00000002 409 #define LCD_CLOCK_CORE 0x00000001 416 #define LCD_SUBPANEL_AT_TOP 0x20000000 417 #define LCD_SUBPANEL_AT_BOTTOM 0x00000000 431 extern uint32_t
LCDModeSet(uint32_t ui32Base, uint8_t ui8Mode,
432 uint32_t ui32PixClk, uint32_t ui32SysClk);
433 extern void LCDClockReset(uint32_t ui32Base, uint32_t ui32Clocks);
443 uint16_t ui16Addr, uint16_t ui16Data);
445 extern uint16_t
LCDIDDDataRead(uint32_t ui32Base, uint32_t ui32CS);
449 const uint32_t *pui32Data, uint32_t ui32Count);
451 uint8_t ui8PalLoadDelay);
459 uint32_t ui32BottomLines,
460 uint32_t ui32DefaultPixel);
465 uint32_t *pui32PalAddr,
466 const uint32_t *pui32SrcColors,
471 uint32_t ui32NumBytes);
472 extern void LCDIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
473 extern void LCDIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags);
474 extern uint32_t
LCDIntStatus(uint32_t ui32Base,
bool bMasked);
475 extern void LCDIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
476 extern void LCDIntRegister(uint32_t ui32Base,
void (*pfnHandler)(
void));
488 #endif // __DRIVERLIB_LCD_H__ void LCDRasterSubPanelDisable(uint32_t ui32Base)
Definition: lcd.c:1216
void LCDIDDDataWrite(uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Data)
Definition: lcd.c:443
void LCDIDDDMADisable(uint32_t ui32Base)
Definition: lcd.c:361
uint8_t ui8RSSetup
Definition: lcd.h:142
uint8_t ui8WSSetup
Definition: lcd.h:119
uint8_t ui8RSHold
Definition: lcd.h:157
uint8_t ui8VBackPorch
Definition: lcd.h:250
uint8_t ui8WSDuration
Definition: lcd.h:126
void LCDRasterPaletteSet(uint32_t ui32Base, uint32_t ui32Type, uint32_t *pui32PalAddr, const uint32_t *pui32SrcColors, uint32_t ui32Start, uint32_t ui32Count)
Definition: lcd.c:1364
uint32_t LCDModeSet(uint32_t ui32Base, uint8_t ui8Mode, uint32_t ui32PixClk, uint32_t ui32SysClk)
Definition: lcd.c:107
void LCDIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: lcd.c:1541
void LCDIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: lcd.c:1591
void LCDRasterFrameBufferSet(uint32_t ui32Base, uint8_t ui8Buffer, uint32_t *pui32Addr, uint32_t ui32NumBytes)
Definition: lcd.c:1473
void LCDRasterSubPanelEnable(uint32_t ui32Base)
Definition: lcd.c:1187
uint8_t ui8WSHold
Definition: lcd.h:134
void LCDIDDDMAWrite(uint32_t ui32Base, uint32_t ui32CS, const uint32_t *pui32Data, uint32_t ui32Count)
Definition: lcd.c:718
void LCDIDDTimingSet(uint32_t ui32Base, uint32_t ui32CS, const tLCDIDDTiming *pTiming)
Definition: lcd.c:298
uint16_t LCDIDDIndexedRead(uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Addr)
Definition: lcd.c:652
void LCDRasterSubPanelConfigSet(uint32_t ui32Base, uint32_t ui32Flags, uint32_t ui32BottomLines, uint32_t ui32DefaultPixel)
Definition: lcd.c:1131
uint8_t ui8ACBiasLineCount
Definition: lcd.h:271
void LCDIDDIndexedWrite(uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Addr, uint16_t ui16Data)
Definition: lcd.c:497
uint8_t ui8VFrontPorch
Definition: lcd.h:243
void LCDIntRegister(uint32_t ui32Base, void(*pfnHandler)(void))
Definition: lcd.c:1741
uint8_t ui8DelayCycles
Definition: lcd.h:165
void LCDIDDConfigSet(uint32_t ui32Base, uint32_t ui32Config)
Definition: lcd.c:255
uint16_t ui16HFrontPorch
Definition: lcd.h:225
uint32_t ui32Flags
Definition: lcd.h:207
uint16_t ui16PanelWidth
Definition: lcd.h:213
uint16_t LCDIDDStatusRead(uint32_t ui32Base, uint32_t ui32CS)
Definition: lcd.c:555
uint8_t ui8VSyncWidth
Definition: lcd.h:263
void LCDRasterDisable(uint32_t ui32Base)
Definition: lcd.c:1076
void LCDIntUnregister(uint32_t ui32Base)
Definition: lcd.c:1779
void LCDIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: lcd.c:1706
uint16_t ui16HSyncWidth
Definition: lcd.h:237
uint16_t ui16PanelHeight
Definition: lcd.h:219
void LCDClockReset(uint32_t ui32Base, uint32_t ui32Clocks)
Definition: lcd.c:178
uint32_t LCDIntStatus(uint32_t ui32Base, bool bMasked)
Definition: lcd.c:1640
void LCDRasterTimingSet(uint32_t ui32Base, const tLCDRasterTiming *pTiming)
Definition: lcd.c:891
void LCDDMAConfigSet(uint32_t ui32Base, uint32_t ui32Config)
Definition: lcd.c:1290
bool LCDRasterEnabled(uint32_t ui32Base)
Definition: lcd.c:1044
uint16_t LCDIDDDataRead(uint32_t ui32Base, uint32_t ui32CS)
Definition: lcd.c:600
void LCDRasterConfigSet(uint32_t ui32Base, uint32_t ui32Config, uint8_t ui8PalLoadDelay)
Definition: lcd.c:843
void LCDRasterACBiasIntCountSet(uint32_t ui32Base, uint8_t ui8Count)
Definition: lcd.c:971
void LCDIDDCommandWrite(uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Cmd)
Definition: lcd.c:398
void LCDRasterEnable(uint32_t ui32Base)
Definition: lcd.c:1011
uint8_t ui8RSDuration
Definition: lcd.h:149
uint16_t ui16HBackPorch
Definition: lcd.h:231