MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
PRG: Prefetch Resolve Gasket

Overview

The MCUXpresso SDK provides a peripheral driver for the PRG module of MCUXpresso SDK devices.

The PRG works with Display Prefetch Resolve (DPR) to prefetch the frame buffer data for display controller.

Data Structures

struct  prg_buffer_config_t
 Frame buffer configuration. More...
 

Macros

#define FSL_PRG_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))
 Driver version. More...
 

Enumerations

enum  prg_data_type_t {
  kPRG_DataType32Bpp = 0x0U,
  kPRG_DataType24Bpp,
  kPRG_DataType16Bpp,
  kPRG_DataType8Bpp
}
 Data type of the frame buffer. More...
 

Functions

void PRG_Init (PRG_Type *base)
 Enables and configures the PRG peripheral module. More...
 
void PRG_Deinit (PRG_Type *base)
 Disables the PRG peripheral module. More...
 
static void PRG_Enable (PRG_Type *base, bool enable)
 Enable or disable the PRG. More...
 
static void PRG_EnableShadowLoad (PRG_Type *base, bool enable)
 Enable or disable the shadow load. More...
 
static void PRG_UpdateRegister (PRG_Type *base)
 Update the registers. More...
 
void PRG_SetBufferConfig (PRG_Type *base, const prg_buffer_config_t *config)
 Set the frame buffer configuration. More...
 
void PRG_BufferGetDefaultConfig (prg_buffer_config_t *config)
 Get the frame buffer default configuration. More...
 
static void PRG_SetBufferAddr (PRG_Type *base, uint32_t addr)
 Set the frame buffer address. More...
 

Data Structure Documentation

struct prg_buffer_config_t

Data Fields

uint16_t width
 Frame buffer width. More...
 
uint16_t height
 Frame buffer height. More...
 
uint16_t strideBytes
 Stride, must be 8 bytes aligned. More...
 
prg_data_type_t dataType
 Data type. More...
 

Field Documentation

uint16_t prg_buffer_config_t::width
uint16_t prg_buffer_config_t::height
uint16_t prg_buffer_config_t::strideBytes
prg_data_type_t prg_buffer_config_t::dataType

Macro Definition Documentation

#define FSL_PRG_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))

Enumeration Type Documentation

Enumerator
kPRG_DataType32Bpp 

32 bits per pixel.

kPRG_DataType24Bpp 

24 bits per pixel.

kPRG_DataType16Bpp 

16 bits per pixel.

kPRG_DataType8Bpp 

8 bits per pixel.

Function Documentation

void PRG_Init ( PRG_Type *  base)
Parameters
basePRG peripheral address.
void PRG_Deinit ( PRG_Type *  base)
Parameters
basePRG peripheral address.
static void PRG_Enable ( PRG_Type *  base,
bool  enable 
)
inlinestatic

If enabled, display controller fetches data from PRG. If disabled, display controller fetches data from frame buffer.

Parameters
basePRG peripheral address.
enablePass in true to enable, false to disable
static void PRG_EnableShadowLoad ( PRG_Type *  base,
bool  enable 
)
inlinestatic

If disabled, the function PRG_UpdateRegister makes the new configurations take effect immediately. If enabled, after calling PRG_UpdateRegister, the new configurations take effect at next frame.

Parameters
basePRG peripheral address.
enablePass in true to enable, false to disable
static void PRG_UpdateRegister ( PRG_Type *  base)
inlinestatic

New configurations set to PRG registers will not take effect immediately until this function is called. If the shadow is disabled by PRG_EnableShadowLoad, the new configurations take effect immediately after this function is called. If the shadow is enabled by PRG_EnableShadowLoad, the new configurations take effect at next frame after this function is called.

Parameters
basePRG peripheral address.
void PRG_SetBufferConfig ( PRG_Type *  base,
const prg_buffer_config_t config 
)
Parameters
basePRG peripheral address.
configPointer to the configuration.
void PRG_BufferGetDefaultConfig ( prg_buffer_config_t config)

The default configuration is:

config->width = 1080U;
config->height = 1920U;
config->strideBytes = 4U * 1080U;
config->dataType = kPRG_DataType32Bpp;
Parameters
configPointer to the configuration.
static void PRG_SetBufferAddr ( PRG_Type *  base,
uint32_t  addr 
)
inlinestatic
Parameters
basePRG peripheral address.
addrFrame buffer address.