Справочник Пользователя для Renesas H8S

Скачать
Страница из 26
Direct Drive LCD Design Guide
 
4.1.10 
LCDSetLineSource 
 
Defines the source regions of the active display window. 
 
Format 
sI16 LCDSetLineSource 
(sI16 Region, sI16 LineCount, uI16 *pSource, sI16 LineStep); 
 
Parameters 
Region 
Region of display (horizontal strip). Ranging from 0 to MAX_FRAME_REGIONS (defined in 
DirectLCD_CNF.h). Normally, region 0 starts at the bottom of the screen. However; when 
V_LINES_INVERT is defined to change line presentation on the screen, region 0 will start at the top 
of the screen. MAX_FRAME_REGIONS should be set to 1 if multiple regions are not used (this will 
eliminate any associated runtime overhead). 
LineCount 
Is the number of lines associated with this region. This value can vary from 1 to V_LINES_PANEL. 
pSource 
Address of the first pixel of the first line within the region. The entire memory space of the region 
must be within the “LCD_Frames” section, or the request will not be accepted. 
LineStep 
Distance (in pixels/uI16’s) from first pixel of first line to first pixel of second line (source regions can 
be wider than the panel). 
 
Return Values 
0 on success, non-0 on failure 
 
Properties 
Prototyped in file ”DirectLCD.h” 
Implemented in file “DirectLCD_SBF.c” for H8S family or “DirectLCD_XBCFT.c” for H8SX family. 
 
Description 
LCDSetLineSource defines the source regions of the active display window. 
Note that LCDSetActiveRaster, LCDSetRasterOffset and LCDSetLineSource are similar in function and 
interact. 
 
Example 
 
#pragma section LCD_Frames 
// SRAM allocated for GUI display 
uI16 GUI_buffer[50 * H_DOT_DISPLAY]; 
// allocate panning buffer 4x panel 
uI16 Image_buffer[2* V_LINES_PANEL * 2 * H_DOT_DISPLAY];  
#pragma section 
 …… 
(void)LCDSetLineSource (0,50,GUI_buffer, H_DOT_DISPLAY); //GUI Region 
(void)LCDSetLineSource (1,V_LINES_PANEL-50, 
 &Image_buffer[ offset], 2*H_DOT_DISPLAY); //Pan Region 
 …… 
23