MSP432E4 DriverLib API Guide
1.11.00.03
|
Data Structures | |
struct | tLCDIDDTiming |
struct | tLCDRasterTiming |
Functions | |
uint32_t | LCDModeSet (uint32_t ui32Base, uint8_t ui8Mode, uint32_t ui32PixClk, uint32_t ui32SysClk) |
void | LCDClockReset (uint32_t ui32Base, uint32_t ui32Clocks) |
void | LCDIDDConfigSet (uint32_t ui32Base, uint32_t ui32Config) |
void | LCDIDDTimingSet (uint32_t ui32Base, uint32_t ui32CS, const tLCDIDDTiming *pTiming) |
void | LCDIDDDMADisable (uint32_t ui32Base) |
void | LCDIDDCommandWrite (uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Cmd) |
void | LCDIDDDataWrite (uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Data) |
void | LCDIDDIndexedWrite (uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Addr, uint16_t ui16Data) |
uint16_t | LCDIDDStatusRead (uint32_t ui32Base, uint32_t ui32CS) |
uint16_t | LCDIDDDataRead (uint32_t ui32Base, uint32_t ui32CS) |
uint16_t | LCDIDDIndexedRead (uint32_t ui32Base, uint32_t ui32CS, uint16_t ui16Addr) |
void | LCDIDDDMAWrite (uint32_t ui32Base, uint32_t ui32CS, const uint32_t *pui32Data, uint32_t ui32Count) |
void | LCDRasterConfigSet (uint32_t ui32Base, uint32_t ui32Config, uint8_t ui8PalLoadDelay) |
void | LCDRasterTimingSet (uint32_t ui32Base, const tLCDRasterTiming *pTiming) |
void | LCDRasterACBiasIntCountSet (uint32_t ui32Base, uint8_t ui8Count) |
void | LCDRasterEnable (uint32_t ui32Base) |
bool | LCDRasterEnabled (uint32_t ui32Base) |
void | LCDRasterDisable (uint32_t ui32Base) |
void | LCDRasterSubPanelConfigSet (uint32_t ui32Base, uint32_t ui32Flags, uint32_t ui32BottomLines, uint32_t ui32DefaultPixel) |
void | LCDRasterSubPanelEnable (uint32_t ui32Base) |
void | LCDRasterSubPanelDisable (uint32_t ui32Base) |
void | LCDDMAConfigSet (uint32_t ui32Base, uint32_t ui32Config) |
void | LCDRasterPaletteSet (uint32_t ui32Base, uint32_t ui32Type, uint32_t *pui32Addr, const uint32_t *pui32SrcColors, uint32_t ui32Start, uint32_t ui32Count) |
void | LCDRasterFrameBufferSet (uint32_t ui32Base, uint8_t ui8Buffer, uint32_t *pui32Addr, uint32_t ui32NumBytes) |
void | LCDIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | LCDIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags) |
uint32_t | LCDIntStatus (uint32_t ui32Base, bool bMasked) |
void | LCDIntClear (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | LCDIntRegister (uint32_t ui32Base, void(*pfnHandler)(void)) |
void | LCDIntUnregister (uint32_t ui32Base) |
The LCD Controller allows a variety of different character and graphic displays to be connected to and driven by the microcontroller. The LCD module contains two independent controllers, one supporting LCD Interface Display Driver (LIDD) mode command and data transactions to character displays as well as displays containing an integrated controller with a packet-based interface, and the other driving clock, syncs and data suitable for RGB raster displays. Up to two simultaneous LIDD displays or a single RGB raster mode display may be driven.
The LCD API provides functions to configure the interface type and timing for the attached display or displays. For LIDD mode displays, functions allow an application to send commands or data to the display or read back status or data. For raster displays, functions allow the pixel clock, HSYNC, VSYNC and ACTIVE timings to be set. Additional functions allow the frame buffer memory to be configured and the color palette to be set.
The LCD Controller API is broken into 4 groups of functions: those that deal with configuration, those relating to control when in LCD Interface Display Driver (LIDD) mode, those relating to control when in Raster mode, and those that manage interrupts.
The configuration of the LCD Controller module is managed by the LCDModeSet(), LCDIDDConfigSet(), LCDIDDTimingSet(), LCDRasterConfigSet(), LCDRasterTimingSet(), LCDRasterSubPanelConfigSet(), LCDDMAConfigSet(), LCDRasterPaletteSet(), and LCDRasterFrameBufferSet() functions.
When in LIDD mode, data transfer to and from the display is controlled by theLCDIDDCommandWrite(), LCDIDDDataWrite(), LCDIDDIndexedWrite(), LCDIDDStatusRead(), LCDIDDDataRead(), LCDIDDIndexedRead(), LCDIDDDMAWrite() and LCDIDDDMADisable() functions.
When in raster mode, communication with the display is controlled by the LCDRasterEnable(), LCDRasterDisable(), LCDRasterSubPanelEnable(), LCDRasterSubPanelDisable() and LCDRasterACBiasIntCountSet() functions.
Interrupts from the LCD Controller module are managed using the LCDIntStatus(), LCDIntClear(), LCDIntDisable(), LCDIntEnable(), LCDIntRegister() and LCDIntUnregister() functions.
The LIDD mode controller allows connection of displays via a synchronous or asynchronous interface using Chip Select (CS), Write Enable (WE), Output Enable (OE) and Address Latch Enable (ALE) signals along with a parallel data bus of 8 to 16 bits.
Several different bus signaling modes are supported to allow connection of devices making use of Hitachi, Motorola or Intel bus conventions. For timing diagrams showing the operation of each of these modes, please consult the datasheet for your particular MSP432E4 part.
LIDD mode would typically be used with displays where updates are made via a packet-based command and data protocol rather than by direct access to a local frame buffer. These will generally be lower resolution RGB panels or character-mode displays.
Interface signaling, timing and basic mode are set using three API functions. To select LIDD mode, LCDModeSet() is called with the ui8Mode parameter set to LCD_MODE_LIDD and the desired bit clock rate. LCDIDDConfigSet() is then called to set the basic operating mode of the LIDD interface (synchronous or asynchronous Motorola or Intel mode, or asynchronous Hitachi mode) and configure the polarities of the various interface control signals. Finally LCDIDDTimingSet() is called to set the timings associated with the interface strobes. When using the asynchronous Intel or Motorola interface modes, two independent chip select (CS) signals are available and timings may be set for these individually allowing two different LIDD panels to be attached simultaneously.
Data may be transfered to or from the panel either one item (8-bit byte or 16-bit word depending upon the panel) at a time or in blocks using DMA. In basic operation, the API provides two sets of functions which allow reading and writing. The choice of function is dictated by the specification of the display in use and the hardware interface it uses. Functions LCDIDDDataRead(), LCDIDDDataWrite(), LCDIDDCommandWrite() and LCDIDDStatusRead() can be used with panels which support a Data/Control (DC) signal to control command or data accesses. Command writes and status reads are performed with the DC signal (on the ALE pin) active whereas data operations occur with the DC signal inactive.
For displays using an external address latch and configured in one of the Intel or Motorola modes, LCDIDDIndexedRead() and LCDIDDIndexedWrite() may be used to read or write indexed registers in the display.
To transfer large blocks of data to the display, DMA may be used via the LCDIDDDMAWrite() function. This function enables the DMA engine in the LCD controller before transfering the required block of data to the display. The DMA engine transfers data 16 bits at a time so data must be padded if a display with an 8 bit interface is used. The completion of a DMA transfer is indicated via the LCD_INT_DMA_DONE interrupt.
Care must be taken when mixing DMA and non-DMA accesses to the display. The application is responsible for ensuring that any previous DMA operation has completed before another is scheduled. Similarly, the application must ensure that it disables DMA using LCDIDDDMADisable() before making a call to LCDIDDCommandWrite(), LCDIDDStatusRead(), LCDIDDDataWrite(), LCDIDDDataRead(), LCDIDDIndexedWrite() or LCDIDDIndexedRead().
Raster mode connects both passive- and active-matrix displays using a traditional video-style, synchronous interface based on VSYNC (LCDFP), HSYNC (LCDLP), VALID (LCDAC), CLK (LCPCP) and DATA (LCDDATA) signals. Unlike LIDD displays which contain their own frame buffer, the display image for a raster display is stored in internal or EPI-attached memory and is scanned to the display using the LCD controller hardware and appropriate refresh rate and line timings provided by the application.
The function LCDModeSet() with parameter ui8Mode set to LCD_MODE_RASTER will select the raster controller mode. This function also sets the required pixel clock frequency. Note that this must be an integer factor of the system clock frequency so applications must ensure that they choose an appropriate system clock frequency to allow the required pixel clock to be set. In cases where the current system clock setting is such that the exact requested pixel clock cannot be set, LCDModeSet() will set the closest lower pixel clock that can be derived given the current system clock frequency and will return that frequency to the caller.
Properties of the display being driven can be set using a call to the function LCDRasterConfigSet(). This configures active- or passive-matrix display, how the color palette is used and various parameters relating to the packing order of pixels in memory. Raster timings and signal polarities are configured using a call to LCDRasterTimingSet().
The frame buffer, whose layout is described in the following section, is configured using a call to LCDRasterFrameBufferSet() which accepts parameters indicating the address of the start of the buffer in memory and its size. Because the frame buffer also contains the pixel format identifier and color palette in addition to the pixel data, LCDRasterPaletteSet() must be called to initialize the palette and format header before the raster is enabled. This is required for all pixel formats, even those which do not require a color lookup table, to ensure correct display.
Once all controller and frame buffer initialization is complete, the display raster can be enabled by calling LCDRasterEnable(). If the display is to be shut down at any point, LCDRasterDisable() may be used.
The LCD controller also supports a subpanel mode which may be helpful in memory constrained systems. This allows the active area on the display to be set to use a number of lines less than the native height. Lines above or below the active area are filled with a default color. The subpanel may be configured using LCDRasterSubPanelConfigSet() which defines the split point between active image and default color and also determines whether the active image area is above or below the split line. When a subpanel is configured, LCDRasterFrameBufferSet() can be called with a frame buffer sized for the number of lines in the subpanel rather than the whole screen. The subpanel may be enabled using LCDRasterSubPanelEnable() and disabled using LCDRasterSubPanelDisable().
When using raster mode, the frame buffer is stored in local SRAM or EPI- connected SDRAM and the application is responsible for ensuring that it is formatted correctly for the LCD controller's current configuration.
The frame buffer contains two sections:
The frame buffer header is 8 words (or 16 half-word palette entries) long when displaying any pixel format other than 8 bits-per-pixel in which case it is 128 words (256 half-word palette entries) in length. Note that the header cannot be removed even when using pixel formats which do not require a palette.
Each entry in the header comprises a 16-bit half-word containing a 12-bit RGB444 color in the bottom 12 bits. The top 4 bits of each entry other than the first are reserved and must be set to 0. The top 4 bits of the first entry contains an identifier informing the LCD controller of the color depth (1-, 2-, 4- or 8-bpp palettized, or direct color 12-, 16- or 24-bpp) in use for the following image data.
The frame buffer type identifier may be set by calling LCDRasterPaletteSet() or by directly writing the first half-word of the frame buffer header with LCD_PALETTE_TYPE_1BPP, LCD_PALETTE_TYPE_2BPP, LCD_PALETTE_TYPE_4BPP, LCD_PALETTE_TYPE_8BPP or LCD_PALETTE_TYPE_DIRECT.
The following example shows how to use the LCD Controller API to configure an 800x480 resolution raster panel and start it displaying from an 8bpp frame buffer. Note that raster timing configuration varies from display to display. Consult your display's datasheet and modify tLCDRasterTiming values as required for your display.
#define PAL_FROM_RGB | ( | ui32RGBColor | ) |
This macro can be used to convert a 24-bit RGB color value as used by the MSP432E4 Graphics Library into a 12-bit LCD controller color palette entry.
Referenced by LCDRasterPaletteSet().
#define CYCLES_FROM_TIME_US | ( | ui32ClockFreq, | |
ui32Time_uS | |||
) |
This macro can be used to convert from time in microseconds to periods of the supplied clock in Hertz as required when setting up the LIDD and raster timing structures. The calculation will round such that the number of cycles returned represents no longer a time than specified in the ui32Time_uS parameter. Values of ui32Time_uS less than or equal to 4294967uS (4.29 seconds) are supported by the macro. Larger values will cause arithmetic overflow and yield incorrect values. It is further assumed that ui32ClockFreq is a non-zero multiple of 1000000 (1MHz).
#define CYCLES_FROM_TIME_NS | ( | ui32ClockFreq, | |
ui32Time_nS | |||
) |
This macro can be used to convert from time in nanoseconds to periods of the supplied clock in Hertz as required when setting up the LIDD and raster timing structures. The calculation will round such that the number of cycles returned represents no longer a time than specified in the ui32Time_nS parameter. Values of ui32Time_nS less than or equal to 35791394 (35.79 milliseconds) are supported by the macro. Larger values will cause arithmetic overflow and yield incorrect values. It is further assumed that ui32ClockFreq is a non-zero multiple of 1000000 (1MHz).
#define RASTER_TIMING_SYNCS_OPPOSITE_PIXCLK 0x00000000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_SYNCS_ON_RISING_PIXCLK 0x02000000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_SYNCS_ON_FALLING_PIXCLK 0x03000000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_ACTIVE_HIGH_OE 0x00000000 |
#define RASTER_TIMING_ACTIVE_LOW_OE 0x00800000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_ACTIVE_HIGH_PIXCLK 0x00000000 |
#define RASTER_TIMING_ACTIVE_LOW_PIXCLK 0x00400000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_ACTIVE_HIGH_HSYNC 0x00000000 |
#define RASTER_TIMING_ACTIVE_LOW_HSYNC 0x00200000 |
Referenced by LCDRasterTimingSet().
#define RASTER_TIMING_ACTIVE_HIGH_VSYNC 0x00000000 |
#define RASTER_TIMING_ACTIVE_LOW_VSYNC 0x00100000 |
Referenced by LCDRasterTimingSet().
#define LCD_MODE_LIDD ((uint8_t)0x00) |
Referenced by LCDModeSet().
#define LCD_MODE_RASTER ((uint8_t)0x01) |
Referenced by LCDModeSet().
#define LCD_MODE_AUTO_UFLOW_RESTART ((uint8_t)0x02) |
Referenced by LCDModeSet().
#define LIDD_CONFIG_SYNC_MPU68 0x00000000 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_ASYNC_MPU68 0x00000001 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_SYNC_MPU80 0x00000002 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_ASYNC_MPU80 0x00000003 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_ASYNC_HITACHI 0x00000004 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_INVERT_ALE 0x00000008 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_INVERT_RS_EN 0x00000010 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_INVERT_WS_DIR 0x00000020 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_INVERT_CS0 0x00000040 |
Referenced by LCDIDDConfigSet().
#define LIDD_CONFIG_INVERT_CS1 0x00000080 |
Referenced by LCDIDDConfigSet().
#define RASTER_FMT_ACTIVE_24BPP_PACKED 0x02000080 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_ACTIVE_24BPP_UNPACKED 0x06000080 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_ACTIVE_PALETTIZED_12BIT 0x00000080 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_ACTIVE_PALETTIZED_16BIT 0x00800080 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_PASSIVE_MONO_4PIX 0x00000002 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_PASSIVE_MONO_8PIX 0x00000202 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_PASSIVE_PALETTIZED 0x00000000 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_PASSIVE_COLOR_12BIT 0x00000000 |
Referenced by LCDRasterConfigSet().
#define RASTER_FMT_PASSIVE_COLOR_16BIT 0x01000000 |
Referenced by LCDRasterConfigSet().
#define RASTER_ACTVID_DURING_BLANK 0x08000000 |
Referenced by LCDRasterConfigSet().
#define RASTER_NIBBLE_MODE_ENABLED 0x00400000 |
Referenced by LCDRasterConfigSet().
#define RASTER_LOAD_DATA_ONLY 0x00200000 |
Referenced by LCDRasterConfigSet().
#define RASTER_LOAD_PALETTE_ONLY 0x00100000 |
Referenced by LCDRasterConfigSet().
#define RASTER_READ_ORDER_REVERSED 0x00000100 |
Referenced by LCDRasterConfigSet().
#define LCD_INT_DMA_DONE 0x00000001 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_RASTER_FRAME_DONE 0x00000002 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_SYNC_LOST 0x00000004 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_AC_BIAS_CNT 0x00000008 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_UNDERFLOW 0x00000020 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_PAL_LOAD 0x00000040 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_EOF0 0x00000100 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_INT_EOF1 0x00000200 |
Referenced by LCDIntClear(), LCDIntDisable(), and LCDIntEnable().
#define LCD_DMA_FIFORDY_8_WORDS 0x00000000 |
#define LCD_DMA_FIFORDY_16_WORDS 0x00000100 |
#define LCD_DMA_FIFORDY_32_WORDS 0x00000200 |
#define LCD_DMA_FIFORDY_64_WORDS 0x00000300 |
#define LCD_DMA_FIFORDY_128_WORDS 0x00000400 |
#define LCD_DMA_FIFORDY_256_WORDS 0x00000500 |
#define LCD_DMA_FIFORDY_512_WORDS 0x00000600 |
#define LCD_DMA_BURST_1 0x00000010 |
#define LCD_DMA_BURST_2 0x00000010 |
#define LCD_DMA_BURST_4 0x00000020 |
#define LCD_DMA_BURST_8 0x00000030 |
#define LCD_DMA_BURST_16 0x00000040 |
#define LCD_DMA_BYTE_ORDER_0123 0x00000000 |
#define LCD_DMA_BYTE_ORDER_1023 0x00000008 |
#define LCD_DMA_BYTE_ORDER_3210 0x00000002 |
#define LCD_DMA_BYTE_ORDER_2301 0x0000000A |
#define LCD_DMA_PING_PONG 0x00000001 |
#define LCD_PALETTE_TYPE_1BPP 0x00000000 |
Referenced by LCDRasterPaletteSet().
#define LCD_PALETTE_TYPE_2BPP 0x00001000 |
Referenced by LCDRasterPaletteSet().
#define LCD_PALETTE_TYPE_4BPP 0x00002000 |
Referenced by LCDRasterPaletteSet().
#define LCD_PALETTE_TYPE_8BPP 0x00003000 |
Referenced by LCDRasterPaletteSet().
#define LCD_PALETTE_TYPE_DIRECT 0x00004000 |
Referenced by LCDRasterPaletteSet().
#define LCD_PALETTE_SRC_24BIT 0x80000000 |
Referenced by LCDRasterPaletteSet().
#define LCD_CLOCK_MAIN 0x00000008 |
Referenced by LCDClockReset(), and LCDRasterEnable().
#define LCD_CLOCK_DMA 0x00000004 |
Referenced by LCDClockReset().
#define LCD_CLOCK_LIDD 0x00000002 |
Referenced by LCDClockReset().
#define LCD_CLOCK_CORE 0x00000001 |
Referenced by LCDClockReset().
#define LCD_SUBPANEL_AT_TOP 0x20000000 |
Referenced by LCDRasterSubPanelConfigSet().
#define LCD_SUBPANEL_AT_BOTTOM 0x00000000 |
Referenced by LCDRasterSubPanelConfigSet().
uint32_t LCDModeSet | ( | uint32_t | ui32Base, |
uint8_t | ui8Mode, | ||
uint32_t | ui32PixClk, | ||
uint32_t | ui32SysClk | ||
) |
Configures the basic operating mode and clock rate for the LCD controller.
ui32Base | specifies the LCD controller module base address. |
ui8Mode | specifies the basic operating mode to be used. |
ui32PixClk | specifies the desired LCD controller pixel or master clock rate in Hz. |
ui32SysClk | specifies the current system clock rate in Hz. |
This function sets the basic operating mode of the LCD controller and also its master clock. The ui8Mode parameter may be set to either LCD_MODE_LIDD or LCD_MODE_RASTER. LCD_MODE_LIDD is used to select LCD Interface Display Driver mode for character panels connected via an asynchronous interface (CS, WE, OE, ALE, data) and LCD_MODE_RASTER is used to communicate with panels via a synchronous video interface using data and sync signals. Additionally, LCD_MODE_AUTO_UFLOW_RESTART may be ORed with either of these modes to indicate that the hardware should restart automatically if a data underflow occurs.
The ui32PixClk parameter specifies the desired master clock for the the LCD controller. In LIDD mode, this value controls the MCLK used in communication with the display and valid values are between ui32SysClk and ui32SysClk/255. In raster mode, ui32PixClk specifies the pixel clock rate for the raster interface and valid values are between ui32SysClk/2 and ui32SysClk/255. The actual clock rate set may differ slightly from the desired rate due to the fact that only integer dividers are supported. The rate set will, however, be no higher than the requested value.
The ui32SysClk parameter provides the current system clock rate and is used to allow the LCD controller clock rate divisor to be correctly set to give the desired ui32PixClk rate.
References ASSERT, HWREG, LCD_CLKEN_CORE, LCD_CLKEN_DMA, LCD_CLKEN_LIDD, LCD_CTL_CLKDIV_S, LCD_MODE_AUTO_UFLOW_RESTART, LCD_MODE_LIDD, LCD_MODE_RASTER, LCD_O_CLKEN, and LCD_O_CTL.
void LCDClockReset | ( | uint32_t | ui32Base, |
uint32_t | ui32Clocks | ||
) |
Resets one or more of the LCD controller clock domains.
ui32Base | specifies the LCD controller module base address. |
ui32Clocks | defines the subset of clock domains to be reset. |
This function allows sub-modules of the LCD controller to be reset under software control. The ui32Clocks parameter is the logical OR of the following clocks:
In all cases, LCD controller register values are preserved across these resets.
References ASSERT, HWREG, LCD_CLOCK_CORE, LCD_CLOCK_DMA, LCD_CLOCK_LIDD, LCD_CLOCK_MAIN, and SysCtlDelay().
Referenced by LCDRasterEnable().
void LCDIDDConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Config | ||
) |
Sets the LCD controller communication parameters when in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32Config | defines the display interface configuration. |
This function is used when the LCD controller is configured in LIDD mode and specifies the configuration of the interface between the controller and the display panel. The ui32Config parameter is comprised of one of the following modes:
Additional flags may be ORed into ui32Config to control the polarities of various control signals:
References ASSERT, HWREG, LCD_O_LIDDCTL, LIDD_CONFIG_ASYNC_HITACHI, LIDD_CONFIG_ASYNC_MPU68, LIDD_CONFIG_ASYNC_MPU80, LIDD_CONFIG_INVERT_ALE, LIDD_CONFIG_INVERT_CS0, LIDD_CONFIG_INVERT_CS1, LIDD_CONFIG_INVERT_RS_EN, LIDD_CONFIG_INVERT_WS_DIR, LIDD_CONFIG_SYNC_MPU68, and LIDD_CONFIG_SYNC_MPU80.
void LCDIDDTimingSet | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
const tLCDIDDTiming * | pTiming | ||
) |
Sets the LCD controller interface timing when in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select whose timings are to be set. |
pTiming | points to a structure containing the desired timing parameters. |
This function is used in LIDD mode to set the setup, strobe and hold times for the various interface control signals. Independent timings are stored for each of the two supported chip selects offered by the LCD controller.
For a definition of the timing parameters required, see the definition of tLCDIDDTiming.
References ASSERT, HWREG, LCD_LIDDCS0CFG_GAP_S, LCD_LIDDCS0CFG_RDDUR_S, LCD_LIDDCS0CFG_RDHOLD_S, LCD_LIDDCS0CFG_RDSU_S, LCD_LIDDCS0CFG_WRDUR_S, LCD_LIDDCS0CFG_WRHOLD_S, LCD_LIDDCS0CFG_WRSU_S, LCD_O_LIDDCS0CFG, LCD_O_LIDDCS1CFG, tLCDIDDTiming::ui8DelayCycles, tLCDIDDTiming::ui8RSDuration, tLCDIDDTiming::ui8RSHold, tLCDIDDTiming::ui8RSSetup, tLCDIDDTiming::ui8WSDuration, tLCDIDDTiming::ui8WSHold, and tLCDIDDTiming::ui8WSSetup.
void LCDIDDDMADisable | ( | uint32_t | ui32Base | ) |
Disables internal DMA operation when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
When the LCD controller is operating in LCD Interface Display Driver mode, this function must be called after completion of a DMA transaction and before calling LCDIDDCommandWrite(), LCDIDDDataWrite(), LCDIDDStatusRead(), LCDIDDIndexedWrite(), LCDIDDIndexedRead() or LCDIDDDataRead() to disable DMA mode and allow CPU-initiated transactions to the display.
References ASSERT, HWREG, LCD_LIDDCTL_DMAEN, and LCD_O_LIDDCTL.
void LCDIDDCommandWrite | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
uint16_t | ui16Cmd | ||
) |
Writes a command to the display when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
ui16Cmd | is the 16-bit command word to write. |
This function writes a 16-bit command word to the display when the LCD controller is in LIDD mode. A command write occurs with the ALE signal active.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0ADDR, and LCD_O_LIDDCS1ADDR.
void LCDIDDDataWrite | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
uint16_t | ui16Data | ||
) |
Writes a data value to the display when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
ui16Data | is the 16-bit data word to write. |
This function writes a 16-bit data word to the display when the LCD controller is in LIDD mode. A data write occurs with the ALE signal inactive.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0DATA, and LCD_O_LIDDCS1DATA.
void LCDIDDIndexedWrite | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
uint16_t | ui16Addr, | ||
uint16_t | ui16Data | ||
) |
Writes data to a given display register when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
ui16Addr | is the address of the display register to write. |
ui16Data | is the data to write. |
This function writes a 16-bit data word to a register in the display when the LCD controller is in LIDD mode and configured to use either the Motorola (LIDD_CONFIG_SYNC_MPU68 or LIDD_CONFIG_ASYNC_MPU68) or Intel (LIDD_CONFIG_SYNC_MPU80 or LIDD_CONFIG_ASYNC_MPU80) modes that employ an external address latch.
When configured in Hitachi mode (LIDD_CONFIG_ASYNC_HITACHI), this function should not be used. In this case the functions LCDIDDCommandWrite() and LCDIDDDataWrite() may be used to transfer command and data bytes to the panel.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0ADDR, LCD_O_LIDDCS0DATA, LCD_O_LIDDCS1ADDR, and LCD_O_LIDDCS1DATA.
uint16_t LCDIDDStatusRead | ( | uint32_t | ui32Base, |
uint32_t | ui32CS | ||
) |
Reads a status word from the display when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
This function reads the 16-bit status word from the display when the LCD controller is in LIDD mode. A status read occurs with the ALE signal active. If the interface is configured in Hitachi mode (LIDD_CONFIG_ASYNC_HITACHI), this operation corresponds to a command mode read.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0ADDR, and LCD_O_LIDDCS1ADDR.
uint16_t LCDIDDDataRead | ( | uint32_t | ui32Base, |
uint32_t | ui32CS | ||
) |
Reads a data word from the display when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
This function reads the 16-bit data word from the display when the LCD controller is in LIDD mode. A data read occurs with the ALE signal inactive.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0DATA, and LCD_O_LIDDCS1DATA.
uint16_t LCDIDDIndexedRead | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
uint16_t | ui16Addr | ||
) |
Reads a given display register when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
ui16Addr | is the address of the display register to read. |
This function reads a 16-bit word from a register in the display when the LCD controller is in LIDD mode and configured to use either the Motorola (LIDD_CONFIG_SYNC_MPU68 or LIDD_CONFIG_ASYNC_MPU68) or Intel (LIDD_CONFIG_SYNC_MPU80 or LIDD_CONFIG_ASYNC_MPU80) modes that employ an external address latch.
When configured in Hitachi mode (LIDD_CONFIG_ASYNC_HITACHI), this function should not be used. In this case, the functions LCDIDDStatusRead() and LCDIDDDataRead() may be used to read status and data bytes from the panel.
This function must not be called if the LIDD interface is currently configured to expect DMA transactions. If DMA was previously used to write to the panel, LCDIDDDMADisable() must be called before this function can be used.
References ASSERT, HWREG, LCD_O_LIDDCS0ADDR, LCD_O_LIDDCS0DATA, LCD_O_LIDDCS1ADDR, and LCD_O_LIDDCS1DATA.
void LCDIDDDMAWrite | ( | uint32_t | ui32Base, |
uint32_t | ui32CS, | ||
const uint32_t * | pui32Data, | ||
uint32_t | ui32Count | ||
) |
Writes a block of data to the display using DMA when the LCD controller is in LIDD mode.
ui32Base | specifies the LCD controller module base address. |
ui32CS | specifies the chip select to use. Valid values are 0 and 1. |
pui32Data | is the address of the first 16-bit word to write. This address must be aligned on a 32-bit word boundary. |
ui32Count | is the number of 16-bit words to write. This value must be a multiple of 2. |
This function writes a block of 16-bit data words to the display using DMA. It is only valid when the LCD controller is in LIDD mode. Completion of the DMA transfer is signaled by the LCD_INT_DMA_DONE interrupt.
This function enables DMA mode prior to starting the transfer. The caller is responsible for ensuring that any earlier DMA transfer has completed before initiating another transfer.
During the time that DMA is enabled, none of the other LCD LIDD data transfer functions may be called. When the DMA transfer is complete and the application wishes to use the CPU to communicate with the display, LCDIDDDMADisable() must be called to disable DMA access prior to calling LCDIDDCommandWrite(), LCDIDDDataWrite(), LCDIDDStatusRead(), LCDIDDIndexedWrite(), LCDIDDIndexedRead() or LCDIDDDataRead().
References ASSERT, HWREG, LCD_LIDDCTL_DMACS, LCD_LIDDCTL_DMAEN, LCD_O_DMABAFB0, LCD_O_DMACAFB0, and LCD_O_LIDDCTL.
void LCDRasterConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Config, | ||
uint8_t | ui8PalLoadDelay | ||
) |
Sets the LCD controller interface timing when in raster mode.
ui32Base | specifies the LCD controller module base address. |
ui32Config | specifies properties of the raster interface and the attached display panel. |
ui8PalLoadDelay | specifies the number of system clocks to wait between each 16 halfword (16-bit) burst when loading the palette from SRAM into the internal palette RAM of the controller. |
This function configures the basic operating mode of the raster interface and specifies the type of panel that the controller is to drive.
The ui32Config parameter must be defined as one of the following to select the required target panel type and output pixel format:
Additionally, the following flags may be ORed into ui32Config:
If the LCD controller's raster engine is enabled when this function is called, it is disabled as a result of the call.
References ASSERT, HWREG, LCD_O_RASTRCTL, LCD_RASTRCTL_REQDLY_S, RASTER_ACTVID_DURING_BLANK, RASTER_FMT_ACTIVE_24BPP_PACKED, RASTER_FMT_ACTIVE_24BPP_UNPACKED, RASTER_FMT_ACTIVE_PALETTIZED_12BIT, RASTER_FMT_ACTIVE_PALETTIZED_16BIT, RASTER_FMT_PASSIVE_COLOR_12BIT, RASTER_FMT_PASSIVE_COLOR_16BIT, RASTER_FMT_PASSIVE_MONO_4PIX, RASTER_FMT_PASSIVE_MONO_8PIX, RASTER_FMT_PASSIVE_PALETTIZED, RASTER_LOAD_DATA_ONLY, RASTER_LOAD_PALETTE_ONLY, RASTER_NIBBLE_MODE_ENABLED, and RASTER_READ_ORDER_REVERSED.
void LCDRasterTimingSet | ( | uint32_t | ui32Base, |
const tLCDRasterTiming * | pTiming | ||
) |
Sets the LCD controller interface timing when in raster mode.
ui32Base | specifies the LCD controller module base address. |
pTiming | points to a structure containing the desired timing parameters. |
This function is used in raster mode to set the panel size and sync timing parameters.
For a definition of the timing parameters required, see the definition of tLCDRasterTiming.
References ASSERT, HWREG, LCD_O_RASTRTIM0, LCD_O_RASTRTIM1, LCD_O_RASTRTIM2, LCD_RASTRTIM0_HBP_S, LCD_RASTRTIM0_HFP_S, LCD_RASTRTIM0_HSW_S, LCD_RASTRTIM0_MSBPPL_S, LCD_RASTRTIM0_PPL_S, LCD_RASTRTIM1_LPP_S, LCD_RASTRTIM1_VBP_S, LCD_RASTRTIM1_VFP_S, LCD_RASTRTIM1_VSW_S, LCD_RASTRTIM2_ACBF_S, LCD_RASTRTIM2_ACBI_M, LCD_RASTRTIM2_HSW_S, LCD_RASTRTIM2_MSBHBP_S, LCD_RASTRTIM2_MSBHFP_S, LCD_RASTRTIM2_MSBLPP_S, RASTER_TIMING_ACTIVE_LOW_HSYNC, RASTER_TIMING_ACTIVE_LOW_OE, RASTER_TIMING_ACTIVE_LOW_PIXCLK, RASTER_TIMING_ACTIVE_LOW_VSYNC, RASTER_TIMING_SYNCS_ON_FALLING_PIXCLK, RASTER_TIMING_SYNCS_ON_RISING_PIXCLK, RASTER_TIMING_SYNCS_OPPOSITE_PIXCLK, tLCDRasterTiming::ui16HBackPorch, tLCDRasterTiming::ui16HFrontPorch, tLCDRasterTiming::ui16HSyncWidth, tLCDRasterTiming::ui16PanelHeight, tLCDRasterTiming::ui16PanelWidth, tLCDRasterTiming::ui32Flags, tLCDRasterTiming::ui8ACBiasLineCount, tLCDRasterTiming::ui8VBackPorch, tLCDRasterTiming::ui8VFrontPorch, and tLCDRasterTiming::ui8VSyncWidth.
void LCDRasterACBiasIntCountSet | ( | uint32_t | ui32Base, |
uint8_t | ui8Count | ||
) |
Sets the number of AC bias pin transitions per interrupt.
ui32Base | is the base address of the controller. |
ui8Count | is the number of AC bias pin transitions to count before the AC bias count interrupt is asserted. Valid values are from 0 to 15. |
This function is used to set the number of AC bias transitions between each AC bias count interrupt (LCD_INT_AC_BIAS_CNT). If ui8Count is 0, no AC bias count interrupt is generated.
References ASSERT, HWREG, LCD_O_RASTRTIM2, LCD_RASTRTIM2_ACBI_M, and LCD_RASTRTIM2_ACBI_S.
void LCDRasterEnable | ( | uint32_t | ui32Base | ) |
Enables the raster output.
ui32Base | is the base address of the controller. |
This function enables the LCD controller raster output and starts displaying the content of the current frame buffer on the attached panel. Prior to enabling the raster output, LCDModeSet(), LCDRasterConfigSet(), LCDDMAConfigSet(), LCDRasterTimingSet(), LCDRasterPaletteSet() and LCDRasterFrameBufferSet() must have been called.
References ASSERT, HWREG, LCD_CLOCK_MAIN, LCD_O_RASTRCTL, LCD_RASTRCTL_LCDEN, and LCDClockReset().
bool LCDRasterEnabled | ( | uint32_t | ui32Base | ) |
Determines whether or not the raster output is currently enabled.
ui32Base | is the base address of the controller. |
This function may be used to query whether or not the raster output is currently enabled.
References ASSERT, HWREG, LCD_O_RASTRCTL, and LCD_RASTRCTL_LCDEN.
void LCDRasterDisable | ( | uint32_t | ui32Base | ) |
Disables the raster output.
ui32Base | is the base address of the controller. |
This function disables the LCD controller raster output and stops driving the attached display.
References ASSERT, HWREG, LCD_O_RASTRCTL, and LCD_RASTRCTL_LCDEN.
void LCDRasterSubPanelConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Flags, | ||
uint32_t | ui32BottomLines, | ||
uint32_t | ui32DefaultPixel | ||
) |
Sets the position and size of the subpanel on the raster display.
ui32Base | is the base address of the controller. |
ui32Flags | may be either LCD_SUBPANEL_AT_TOP to show frame buffer image data in the top portion of the display and default color in the bottom portion, or LCD_SUBPANEL_AT_BOTTOM to show image data at the bottom of the display and default color at the top. |
ui32BottomLines | defines the number of lines comprising the bottom portion of the display. If LCD_SUBPANEL_AT_TOP is set in ui32Flags, these lines contain the default pixel color when the subpanel is enabled, otherwise they contain image data. |
ui32DefaultPixel | is the 24-bit RGB color to show in the portion of the display not configured to show image data. |
The LCD controller provides a feature that allows a portion of the display to be filled with a default color rather than image data from the frame buffer. This feature reduces SRAM bandwidth requirements because no data is fetched for lines containing the default color. This feature is only available when the LCD controller is in raster mode and configured to drive an active matrix display.
The subpanel area containing image data from the frame buffer may be positioned either at the top or bottom of the display as controlled by the value of ui32Flags. The height of the bottom portion of the display is defined by ui32BottomLines.
When a subpanel is configured, the application must also reconfigure the frame buffer to ensure that it contains the correct number of lines for the subpanel size in use. This configuration can be achieved by calling LCDRasterFrameBufferSet() with the ui32NumBytes parameter set appropriately to describe the required number of active video lines in the subpanel area.
The subpanel display mode is not enabled using this function. To enable the subpanel once it has been configured, call LCDRasterSubPanelEnable().
References ASSERT, HWREG, LCD_O_RASTRSUBP1, LCD_O_RASTRSUBP2, LCD_RASTRSUBP1_DPDLSB_S, LCD_RASTRSUBP1_LPPT_M, LCD_RASTRSUBP1_LPPT_S, LCD_RASTRSUBP1_SPEN, LCD_RASTRSUBP2_DPDMSB_M, LCD_SUBPANEL_AT_BOTTOM, and LCD_SUBPANEL_AT_TOP.
void LCDRasterSubPanelEnable | ( | uint32_t | ui32Base | ) |
Enables subpanel display mode.
ui32Base | is the base address of the controller. |
This function enables subpanel display mode and displays a default color rather than image data in the number of lines and at the position specified by a previous call to LCDRasterSubPanelConfigSet(). Prior to calling LCDRasterSubPanelEnable(), the frame buffer should have been reconfigured to match the desired subpanel size using a call to LCDRasterFrameBufferSet().
Subpanel display is only possible when the LCD controller is in raster mode and is configured to drive an active matrix display.
References ASSERT, HWREG, LCD_O_RASTRSUBP1, and LCD_RASTRSUBP1_SPEN.
void LCDRasterSubPanelDisable | ( | uint32_t | ui32Base | ) |
Disables subpanel display mode.
ui32Base | is the base address of the controller. |
This function disables subpanel display mode and reverts to showing the entire frame buffer image on the display. After the subpanel is disabled, the frame buffer size must be reconfigured to match the full dimensions of the display area by calling LCDRasterFrameBufferSet() with an appropriate value for the ui32NumBytes parameter.
References ASSERT, HWREG, LCD_O_RASTRSUBP1, and LCD_RASTRSUBP1_SPEN.
void LCDDMAConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Config | ||
) |
Configures the LCD controller's internal DMA engine.
ui32Base | is the base address of the controller. |
ui32Config | provides flags defining the desired DMA parameters. |
This function is used to configure the DMA engine within the LCD controller. This engine is responsible for performing bulk data transfers to the display when in LIDD mode or for transferring palette and pixel data from SRAM to the display panel when in raster mode.
The ui32Config parameter is a logical OR of various flags. It must contain one value from each of the following groups.
The first group of flags set the number of words that have to be in the FIFO before it signals that it is ready:
The second group of flags set the number of 32-bit words in each DMA burst transfer:
The final group of flags set internal byte lane controls and allow byte swapping within the DMA engine. The label represents the output byte order for an input 32-bit word ordered ``0123''.
Additionally, LCD_DMA_PING_PONG may be specified. This flag configures the controller to operate in double-buffered mode. When data is scanned out from the first frame buffer, the DMA engine immediately moves to the second frame buffer and scans from there before moving back to the first. If this flag is clear, the DMA engine uses a single frame buffer, restarting the scan from the beginning of the buffer each time it completes a frame.
References ASSERT, HWREG, LCD_DMACTL_BIGDEND, LCD_DMACTL_BURSTSZ_M, LCD_DMACTL_BYTESWAP, LCD_DMACTL_FIFORDY_M, LCD_DMACTL_FMODE, and LCD_O_DMACTL.
void LCDRasterPaletteSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Type, | ||
uint32_t * | pui32Addr, | ||
const uint32_t * | pui32SrcColors, | ||
uint32_t | ui32Start, | ||
uint32_t | ui32Count | ||
) |
Initializes the color palette in a frame buffer.
ui32Base | is the base address of the controller. |
ui32Type | specifies the type of pixel data to be held in the frame buffer and also the format of the source color values passed. |
pui32Addr | points to the start of the frame buffer into which the palette information is to be written. |
pui32SrcColors | points to the first color value that is to be written into the frame buffer palette. |
ui32Start | specifies the index of the first color in the palette to update. |
ui32Count | specifies the number of source colors to be copied into the frame buffer palette. |
This function is used to initialize the color palette stored at the beginning of a frame buffer. It writes the relevant pixel type into the first entry of the frame buffer and copies the requested number of colors from a source buffer into the palette starting at the required index, optionally converting them from 24-bit color format into the 12-bit format used by the LCD controller.
ui32Type must be set to one of the following values to indicate the type of frame buffer for which the palette is being initialized:
Optionally, the LCD_PALETTE_SRC_24BIT flag may be ORed into ui32Type to indicate that the supplied colors in the pui32SrcColors array are in the 24-bit format as used by the MSP432E4 Graphics Library with one color stored in each 32-bit word. In this case, the colors read from the source array are converted to the 12-bit format used by the LCD controller before being written into the frame buffer palette.
If LCD_PALETTE_SRC_24BIT is not present, it is assumed that the pui32SrcColors array contains 12-bit colors in the format required by the LCD controller with 2 colors stored in each 32-bit word. In this case, the values are copied directly into the frame buffer palette without any reformatting.
References ASSERT, LCD_PALETTE_SRC_24BIT, LCD_PALETTE_TYPE_1BPP, LCD_PALETTE_TYPE_2BPP, LCD_PALETTE_TYPE_4BPP, LCD_PALETTE_TYPE_8BPP, LCD_PALETTE_TYPE_DIRECT, and PAL_FROM_RGB.
void LCDRasterFrameBufferSet | ( | uint32_t | ui32Base, |
uint8_t | ui8Buffer, | ||
uint32_t * | pui32Addr, | ||
uint32_t | ui32NumBytes | ||
) |
Sets the LCD controller frame buffer start address and size in raster mode.
ui32Base | is the base address of the controller. |
ui8Buffer | specifies which frame buffer to configure. Valid values are 0 and 1. |
pui32Addr | points to the first byte of the frame buffer. This pointer must be aligned on a 32-bit (word) boundary. |
ui32NumBytes | specifies the size of the frame buffer in bytes. This value must be a multiple of 4. |
This function is used to configure the position and size of one of the two supported frame buffers while in raster mode. The second frame buffer (configured when ui8Buffer is set to 1) is only used if the controller is set to operate in ping-pong mode (by specifying the LCD_DMA_PING_PONG configuration flag on a call to LCDDMAConfigSet()).
The format of the frame buffer depends on the image type in use and the current raster configuration settings. If RASTER_LOAD_DATA_ONLY was specified in a previous call to LCDRasterConfigSet(), the frame buffer contains only packed pixel data in the required bit depth and format. In other cases, the frame buffer comprises a palette of either 8 or 128 32-bit words followed by the packed pixel data. The palette size is 8 words (16 16-bit entries) for all pixel formats other than 8bpp which uses a palette of 128 words (256 16-bit entries). Note that the 8 word palette is still present even for 12, 16 and 24-bit formats, which do not use the lookup table.
The frame buffer size, specified using the ui32NumBytes parameter, must be the palette size (if any) plus the size of the image bitmap required for the currently configured display resolution.
ui32NumBytes = (Palette Size) + ((Width * Height) * BPP) / 8)
If RASTER_LOAD_DATA_ONLY is not specified, frame buffers passed to this function must be initialized using a call to LCDRasterPaletteSet() prior to enabling the raster output. If this is not done, the pixel format identifier and color table required by the hardware is not present and the results are unpredictable.
References ASSERT, HWREG, LCD_O_DMABAFB0, LCD_O_DMABAFB1, LCD_O_DMACAFB0, and LCD_O_DMACAFB1.
void LCDIntEnable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Enables individual LCD controller interrupt sources.
ui32Base | is the base address of the controller. |
ui32IntFlags | is the bit mask of the interrupt sources to be enabled. |
This function enables the indicated LCD controller interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ui32IntFlags parameter is the logical OR of any of the following:
References ASSERT, HWREG, LCD_INT_AC_BIAS_CNT, LCD_INT_DMA_DONE, LCD_INT_EOF0, LCD_INT_EOF1, LCD_INT_PAL_LOAD, LCD_INT_RASTER_FRAME_DONE, LCD_INT_SYNC_LOST, LCD_INT_UNDERFLOW, and LCD_O_IM.
void LCDIntDisable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Disables individual LCD controller interrupt sources.
ui32Base | is the base address of the controller. |
ui32IntFlags | is the bit mask of the interrupt sources to be disabled. |
This function disables the indicated LCD controller interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ui32IntFlags parameter is the logical OR of any of the following:
References ASSERT, HWREG, LCD_INT_AC_BIAS_CNT, LCD_INT_DMA_DONE, LCD_INT_EOF0, LCD_INT_EOF1, LCD_INT_PAL_LOAD, LCD_INT_RASTER_FRAME_DONE, LCD_INT_SYNC_LOST, LCD_INT_UNDERFLOW, and LCD_O_IENC.
uint32_t LCDIntStatus | ( | uint32_t | ui32Base, |
bool | bMasked | ||
) |
Gets the current LCD controller interrupt status.
ui32Base | is the base address of the controller. |
bMasked | is false if the raw interrupt status is required and true if the masked interrupt status is required. |
This function returns the interrupt status for the LCD controller. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.
References ASSERT, HWREG, LCD_O_MISCLR, and LCD_O_RISSET.
void LCDIntClear | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Clears LCD controller interrupt sources.
ui32Base | is the base address of the controller. |
ui32IntFlags | is a bit mask of the interrupt sources to be cleared. |
The specified LCD controller interrupt sources are cleared so that they no longer assert. This function must be called in the interrupt handler to keep the interrupt from being triggered again immediately upon exit.
The ui32IntFlags parameter is the logical OR of any of the following:
References ASSERT, HWREG, LCD_INT_AC_BIAS_CNT, LCD_INT_DMA_DONE, LCD_INT_EOF0, LCD_INT_EOF1, LCD_INT_PAL_LOAD, LCD_INT_RASTER_FRAME_DONE, LCD_INT_SYNC_LOST, LCD_INT_UNDERFLOW, and LCD_O_MISCLR.
void LCDIntRegister | ( | uint32_t | ui32Base, |
void(*)(void) | pfnHandler | ||
) |
Registers an interrupt handler for the LCD controller module.
ui32Base | specifies the LCD controller module base address. |
pfnHandler | is a pointer to the function to be called when the LCD controller interrupt occurs. |
This function registers the handler to be called when the LCD controller module interrupt occurs.
References ASSERT, INT_LCD0, IntEnable(), and IntRegister().
void LCDIntUnregister | ( | uint32_t | ui32Base | ) |
Unregisters the interrupt handler for the LCD controller module.
ui32Base | specifies the LCD controller module base address. |
This function unregisters the interrupt handler and disables the global LCD controller interrupt in the interrupt controller.
References ASSERT, INT_LCD0, IntDisable(), and IntUnregister().