本文整理汇总了C++中TRIDENTPTR函数的典型用法代码示例。如果您正苦于以下问题:C++ TRIDENTPTR函数的具体用法?C++ TRIDENTPTR怎么用?C++ TRIDENTPTR使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TRIDENTPTR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XPSetupForMono8x8PatternFill
static void
XPSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
int patternx, int patterny,
int fg, int bg, int rop,
unsigned int planemask)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
REPLICATE(fg);
MMIO_OUT32(pTrident->IOBase, 0x2158, fg);
if (bg == -1) {
drawflag |= 1<<12;
MMIO_OUT32(pTrident->IOBase, 0x215C, ~fg);
} else {
REPLICATE(bg);
MMIO_OUT32(pTrident->IOBase, 0x215C, bg);
}
drawflag |= 7<<18;
TGUI_DRAWFLAG(PATMONO | drawflag);
MMIO_OUT32(pTrident->IOBase, 0x2180, patternx);
MMIO_OUT32(pTrident->IOBase, 0x2184, patterny);
TGUI_FMIX(XAAPatternROP[rop]);
}
示例2: TridentClearSync
static void
TridentClearSync(ScrnInfoPtr pScrn)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int count = 0, timeout = 0;
int busy;
for (;;) {
BLTBUSY(busy);
if (busy != GE_BUSY) {
return;
}
count++;
if (count == 10000000) {
ErrorF("Trident: BitBLT engine time-out.\n");
count = 9990000;
timeout++;
if (timeout == 8) {
/* Reset BitBLT Engine */
TGUI_STATUS(0x00);
return;
}
}
}
}
示例3: TridentSetupForScreenToScreenCopy
static void
TridentSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
int xdir, int ydir, int rop,
unsigned int planemask, int transparency_color)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int dst = 0;
pTrident->BltScanDirection = 0;
if (xdir < 0) pTrident->BltScanDirection |= XNEG;
if (ydir < 0) pTrident->BltScanDirection |= YNEG;
REPLICATE(transparency_color);
if (transparency_color != -1) {
if (pTrident->Chipset == PROVIDIA9685 ||
pTrident->Chipset == CYBER9388) {
dst |= 1<<16;
} else {
TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
}
TGUI_CKEY(transparency_color);
}
TGUI_DRAWFLAG(pTrident->DrawFlag | pTrident->BltScanDirection | SCR2SCR | dst);
TGUI_FMIX(XAAGetCopyROP(rop));
}
示例4: XPInitializeAccelerator
static void
XPInitializeAccelerator(ScrnInfoPtr pScrn)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int shift;
/* This forces updating the clipper */
pTrident->Clipping = TRUE;
CHECKCLIPPING;
BLADE_XP_OPERMODE(pTrident->EngineOperation);
pTrident->EngineOperation |= 0x40;
switch (pScrn->bitsPerPixel) {
case 8:
default: /* Muffle compiler */
shift = 18;
break;
case 16:
shift = 19;
break;
case 32:
shift = 20;
break;
}
MMIO_OUT32(pTrident->IOBase, 0x2154, (pScrn->displayWidth) << shift);
MMIO_OUT32(pTrident->IOBase, 0x2150, (pScrn->displayWidth) << shift);
MMIO_OUT8(pTrident->IOBase, 0x2126, 3);
}
示例5: XPSync
static void
XPSync(ScrnInfoPtr pScrn)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int count = 0, timeout = 0;
int busy;
BLADE_XP_OPERMODE(pTrident->EngineOperation);
for (;;) {
BLTBUSY(busy);
if (busy != GE_BUSY) {
return;
}
count++;
if (count == 10000000) {
ErrorF("XP: BitBLT engine time-out.\n");
count = 9990000;
timeout++;
if (timeout == 8) {
/* Reset BitBLT Engine */
TGUI_STATUS(0x00);
return;
}
}
}
}
示例6: XP4SetupForCPUToScreenColorExpandFill
static void
XP4SetupForCPUToScreenColorExpandFill(
ScrnInfoPtr pScrn,
int fg, int bg,
int rop,
unsigned int planemask
){
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
ropcode = XAAGetCopyROP(rop);
#if 0
TGUI_FMIX(XAACopyROP[rop]);
#endif
if (bg == -1) {
TGUI_DRAWFLAG(SRCMONO | 1<<12);
REPLICATE(fg);
TGUI_FCOLOUR(fg);
} else {
TGUI_DRAWFLAG(SRCMONO);
REPLICATE(fg);
REPLICATE(bg);
TGUI_FCOLOUR(fg);
TGUI_BCOLOUR(bg);
}
}
示例7: TridentSetupForColor8x8PatternFill
static void
TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn,
int patternx, int patterny,
int rop,
unsigned int planemask,
int transparency_color)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
int drawflag = 0;
REPLICATE(transparency_color);
if (transparency_color != -1) {
if (pTrident->Chipset == PROVIDIA9685 ||
pTrident->Chipset == CYBER9388) {
drawflag |= 1<<16;
} else {
TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
}
TGUI_CKEY(transparency_color);
}
TGUI_DRAWFLAG(pTrident->DrawFlag | PAT2SCR | drawflag);
TGUI_PATLOC(((patterny * pTrident->PatternLocation) +
(patternx * pScrn->bitsPerPixel / 8)) >> 6);
TGUI_FMIX(XAAGetPatternROP(rop));
}
示例8: smbus_write
static void smbus_write(ScrnInfoPtr pScrn, unsigned char bData, unsigned char bIndex, unsigned char devAdr)
{
TRIDENTPtr pTrident=TRIDENTPTR(pScrn);
unsigned short i;
/* clear host status */
OUTB(SMBUS_BASE, 0xFF);
/* check SMBUS ready */
for ( i = 0; i < 0xFFFF; i++ )
if ( (INB(SMBUS_BASE) & 0x01) == 0 )
break;
OUTB(SMBUS_BASE+2, 0x08);
/* set host command */
OUTB(SMBUS_BASE+3, bIndex);
/* set slave address */
OUTB(SMBUS_BASE+4, devAdr & 0xFE);
OUTB(SMBUS_BASE+5, bData);
/* start */
OUTB(SMBUS_BASE+2, 0x48);
/* SMBUS Wait Ready */
for ( i = 0; i < 0xFFFF; i++ )
if ( (INB(SMBUS_BASE) & 0x01) == 0 )
break;
}
示例9: smbus_read
static unsigned char smbus_read(ScrnInfoPtr pScrn, unsigned char bIndex, unsigned char devAdr)
{
TRIDENTPtr pTrident=TRIDENTPTR(pScrn);
unsigned short i;
unsigned char bData;
/* clear host status */
OUTB(SMBUS_BASE, 0xFF);
/* check SMBUS ready */
for ( i = 0; i < 0xFFFF; i++ )
if ( (INB(SMBUS_BASE) & 0x01) == 0 )
break;
/* set host command */
OUTB(SMBUS_BASE+3, bIndex);
/* set slave address */
OUTB(SMBUS_BASE+4, devAdr | 0x01);
/* start */
OUTB(SMBUS_BASE+2, 0x48);
/* SMBUS Wait Ready */
for ( i = 0; i < 0xFFFF; i++ )
if ( (INB(SMBUS_BASE) & 0x01) == 0 )
break;
bData=INB(SMBUS_BASE+5);
return bData;
}
示例10: TridentSubsequentFillRectSolid
static void
TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
TGUI_DIM_XY(w,h);
TGUI_DEST_XY(x,y);
TGUI_COMMAND(GE_BLT);
TridentSync(pScrn);
}
示例11: XP4SubsequentFillRectSolid
static void
XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
XP4Sync(pScrn);
MMIO_OUT32(pTrident->IOBase, 0x2124, XAAGetPatternROP(ropcode) << 24 | bpp << 8 | 2);
}
示例12: XPSetupForFillRectSolid
static void
XPSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
int rop, unsigned int planemask)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
REPLICATE(color);
TGUI_FMIX(XAAPatternROP[rop]);
MMIO_OUT32(pTrident->IOBase, 0x2158, color);
TGUI_DRAWFLAG(SOLIDFILL);
}
示例13: XP4SetupForFillRectSolid
static void
XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
int rop, unsigned int planemask)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
ropcode = rop;
REPLICATE(color);
MMIO_OUT32(pTrident->IOBase, 0x2158, color);
MMIO_OUT32(pTrident->IOBase, 0x2128, 1<<14);
}
示例14: TridentSubsequentColor8x8PatternFillRect
static void
TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
int patternx, int patterny,
int x, int y,
int w, int h)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
TGUI_DEST_XY(x,y);
TGUI_DIM_XY(w,h);
TGUI_COMMAND(GE_BLT);
TridentClearSync(pScrn);
}
示例15: XP4SubsequentCPUToScreenColorExpandFill
static void
XP4SubsequentCPUToScreenColorExpandFill(
ScrnInfoPtr pScrn,
int x, int y, int w, int h,
int skipleft
){
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
XP4Sync(pScrn);
MMIO_OUT32(pTrident->IOBase, 0x2124, ropcode << 24 | bpp << 8 | 2);
}