baseport/syborg/fb/syborg_fb.h
changeset 46 b6935a90ca64
parent 16 73107a0bc259
equal deleted inserted replaced
45:01c1ffcc4fca 46:b6935a90ca64
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
       
    13 *
       
    14 * Accenture Ltd - Syborg framebuffer improvements, now auto determines frame size from board model, performance and memory improvements
    13 *
    15 *
    14 * Description: Minimalistic frame buffer driver
    16 * Description: Minimalistic frame buffer driver
    15 *
    17 *
    16 */
    18 */
    17 
    19 
    23 #include <kernel.h>
    25 #include <kernel.h>
    24 #include <kpower.h>
    26 #include <kpower.h>
    25 #include <system.h>
    27 #include <system.h>
    26 
    28 
    27 
    29 
    28 
       
    29 // The definition of __portrait_display__ in the MMP file affects
       
    30 // both the display and the pointer component, so both must be
       
    31 // rebuilt if this setting is changed.
       
    32 
       
    33 
       
    34 _LIT(KLitLcd,"SYBORG_FB");
    30 _LIT(KLitLcd,"SYBORG_FB");
    35 
    31 
    36 
    32 const TInt	KConfigLcdWidthInTwips     = 9638;
    37 #ifdef __PORTRAIT_DISPLAY__ // portrait display selected
    33 const TInt	KConfigLcdHeightInTwips    = 7370;
    38 
       
    39 #	ifdef __DISPLAY_WVGA__
       
    40 
       
    41 #pragma comment(layout,"Portrait display enabled")
       
    42 const TUint KConfigLcdWidth            	= 854; // This must be left at 640, even with only 360 used by S60
       
    43 const TUint	KConfigLcdHeight	       	= 854;
       
    44 const TInt	KConfigLcdHeightInTwips     = 12860;
       
    45 const TInt	KConfigLcdWidthInTwips    	= 12860;
       
    46 const TUint	KConfigMouseWidth	       	= 480; // Usable width for the mouse driver
       
    47 const TUint	KConfigMouseMin			   	= 0;
       
    48 
       
    49 #	else //__DISPLAY_WVGA__
       
    50 
       
    51 #pragma comment(layout,"Portrait display enabled")
       
    52 const TUint KConfigLcdWidth            = 640; // This must be left at 640, even with only 360 used by S60
       
    53 const TUint	KConfigLcdHeight	       = 640;
       
    54 const TInt	KConfigLcdHeightInTwips     = 3550;
       
    55 const TInt	KConfigLcdWidthInTwips    = 3550;
       
    56 const TUint	KConfigMouseWidth	       = 360; // Usable width for the mouse driver
       
    57 
       
    58 const TUint	KConfigMouseMin			   = 0;
       
    59 #	endif //__DISPLAY_WVGA__
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 #else // __PORTRAIT_DISPLAY__  Landscape display selected
       
    65 
       
    66 #pragma comment(layout,"Landscape display enabled")
       
    67 const TUint  KConfigLcdWidth            = 640;
       
    68 const TUint	KConfigLcdHeight	       = 480;
       
    69 const TInt	KConfigLcdWidthInTwips     = 3550;
       
    70 const TInt	KConfigLcdHeightInTwips    = 2670;
       
    71 const TUint	KConfigMouseWidth	       = 640; // Usable width for the mouse driver
       
    72 
       
    73 const TUint	KConfigMouseMin			   = 120; // mouse range is 120 - 480, not 0 - 360
       
    74 #endif // __PORTRAIT_DISPLAY__
       
    75 
       
    76 
    34 
    77 const TBool KConfigIsMono              = 0;
    35 const TBool KConfigIsMono              = 0;
    78 const TBool KConfigIsPalettized        = 0;
    36 const TBool KConfigIsPalettized        = 0;
    79 
    37 
    80 const TInt  KConfigOffsetToFirstPixel  = 0;
    38 const TInt  KConfigOffsetToFirstPixel  = 0;
    81 
    39 
    82 const TBool KConfigPixelOrderRGB       = 0;
    40 const TBool KConfigPixelOrderRGB       = 0;
    83 const TBool KConfigPixelOrderLandscape = 1;
    41 const TBool KConfigPixelOrderLandscape = 1;
    84 const TInt  KConfigLcdDisplayMode       = 2;
    42 const TInt  KConfigLcdDisplayMode       = 2;
    85 //const TInt  KConfigLcdDisplayMode       = 1;
    43 
       
    44 
    86 const TInt  KConfigLcdNumberOfDisplayModes = 3;
    45 const TInt  KConfigLcdNumberOfDisplayModes = 3;
    87 
    46 
    88 
    47 
    89 const TInt  KConfigBitsPerPixel        = 24;
    48 const TInt  KConfigBitsPerPixel        = 24;
    90 
    49 
    91 #ifdef __DISPLAY_WVGA__
    50 
    92 const TInt  KConfigOffsetBetweenLines  = 3416;
       
    93 #else //__DISPLAY_WVGA__
       
    94 const TInt  KConfigOffsetBetweenLines  = 2560;
       
    95 #endif //__DISPLAY_WVGA__
       
    96 
    51 
    97 
    52 
    98 class DLcdPowerHandler : public DPowerHandler
    53 class DLcdPowerHandler : public DPowerHandler
    99 {
    54 {
   100 public: // from DPowerHandler
    55 public: // from DPowerHandler