beautypg.com

An269 – Cirrus Logic AN269 User Manual

Page 44

background image

44

AN269REV1

AN269

int start_position)

/* Description:

* This allows a small range of LUT entries to be replaced.

*

*

* Exception Handling (if any):

* none

*

* Garbage Collection (if any):

* none

*

* Global Data:

* |>I | O | IO<|, |>dataname<|

*

** END_FUNC ******************************************************************/

{

INT32 x;

for(x = 0;x < number_of_entries;x++)

{

Raster->COLOR_LUT[start_position + x].Value = *(data + x);

}

}

// These are function calls that will fill the grayscale and color LUTs

// Fill first LUT

RASTER_PartialFillLUT((INT32 *)four_bpp_lut_gs,sizeof(four_bpp_lut_gs)/4,0);

Raster->LUTCONT.Value = 1;

while(Raster->LUTCONT.Field.SSTAT != 1);

//fill 2nd LUT with same data

RASTER_PartialFillLUT((INT32 *)four_bpp_lut_gs,sizeof(four_bpp_lut_gs)/4,0);

RASTER_FillGreyLUT((INT32 *)rgb_gs_lut_r,0);

RASTER_FillGreyLUT((INT32 *)rgb_gs_lut_g,1);

RASTER_FillGreyLUT((INT32 *)rgb_gs_lut_b,2);