亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? syswindml.c

?? 操作系統中的一找你個的相關的淡淡的碼源代碼
?? C
字號:
/* sysWindML.c - WindML BSP specific routines for MagicARM2410 */

/* Copyright 2001 Wind River Systems, Inc. */
#include <vxWorks.h>
#include <ugl/sysWindML.h>
/* the file of BSP */
#include <config.h>

/*
DESCRIPTION

This library provides board-specific routines to support WindML.  This file is 
included at the end of sysLib.c when WindML functionality is to be included.

This API is designed in a general fashion, such that it is applicable to all
processor types and is bus independent.  It provides the support equally for
graphics devices that are integral to a processor (such as with the PPC821) 
and graphics devices that are present on a PCI bus. 

The API provides support for configurations where a system has multiple graphics
devices and input devices.

A data structure allocated within the BSP provides information describing the 
graphics, input (keyboard and pointer), and audio devices.  A serial pointer
that connects to a standard serial port (such as, /tyCo/0) is not covered by
this API.  Those devices use the standard serial drivers.

The data structure to define the graphics device is as follows:

 typedef struct windml_device
   {
    UINT32  vendorID,                   /@ vendor ID @/
    UINT32  deviceID,                   /@ device ID @/
    UINT32  instance,                   /@ instance of device @/
    UINT32  devType,                    /@ type of input device @/
    UINT32  regDelta;                   /@ distance between adjacent registers @/
    UINT32  intLevel;                   /@ interrupt level to be used @/
    VOIDFUNCPTR * intVector;            /@ interrupt vector to be used @/
    void    * pPhysBaseAdrs0;           /@ first base address @/
    void    * pPhysBaseAdrs1;           /@ second base address @/
    void    * pPhysBaseAdrs2;           /@ third base address @/
    void    * pPhysBaseAdrs3;           /@ fourth base address @/
    void    *pRegBase;                  /@ base address of register space @/
   } WINDML_DEVICE;


 The above structure provides space for up to two memory segments that are used
 to access the device (for example, one segment for the frame buffer
 and another for the memory mapped registers).  Typically, a device 
 will only have a single memory segment.  The size field identifies the number
 of bytes present within the memory segment.

 The <pRegBase> field identifies the base address to use to access the I/O ports.
 This is typically the base of the ISA space.  For X86 type processors, this
 field would be set to 0.  For powerPC processors, this field would be set 
 according to the memory model used (PRep or CHRP).

INCLUDE FILES: ugl/sysWindML.h
*/

/******************************************************************************
*
* sysWindMLDevGet - configures the device
*
* This routine will determine the presence of the device and perform any device 
* configuration required.  The behaviour of this function varies depending on the 
* type of device configuration (such as a PCI device, integral, device 
* controller, etc.).  A device configuration data structure is created for the 
* specified device.  This configuration data defines the access mechanism for 
* the device.    
*
* The <vendorID> and <deviceID> identify the vendor and device identifiers in
* the PCI environment.  If these values are set to zero, then the <instance> 
* occurrence of a device will be returned.  For example, if the <instance> and 
* <vendorID> were set to zero, then the routine will return the first occurrence 
* of a device.
* 
* The returned data structure provides miscellaneous data items that describe 
* the manner in which to access the device.  
*
* RETURNS: When device has been successfully configured, the address of the
*          device data structure; otherwise NULL
*
*/

WINDML_DEVICE * sysWindMLDevGet 
(
    UINT32 devType,     /* Device Type */
    UINT32 instance,    /* The instance of the device */
    UINT32 vendorID,    /* The identifier for the device manufacturer */
    UINT32 deviceID     /* The identifier for the device */
)
{
    WINDML_DEVICE * pDev = NULL;
    int busno, slotno, funcno;
    UINT16 data;
    switch (devType) {
    case WINDML_GRAPHICS_DEVICE :
    {
        if (vendorID == 0 || deviceID == 0)
        {
            vendorID = data;
            deviceID = data;
        }
        else
        {
        	printf("verdorID and deviceID are not 0.\n");
        }

        pDev = (WINDML_DEVICE *)calloc(1, sizeof(WINDML_DEVICE));

        if (pDev == NULL)
        {
            return (pDev);
        }
        
        /* memRgn = */
        
        pDev->vendorID = vendorID;
        pDev->deviceID = deviceID;
        pDev->instance = instance;
        pDev->devType = devType;
        
        /* LCD buffer address */
        pDev->pPhysBaseAdrs0 = (void *)cacheDmaMalloc(640 * 480 * 16 / 8);
        
        pDev->pPhysBaseAdrs1 = 0;
        pDev->pPhysBaseAdrs2 = 0;
        pDev->pPhysBaseAdrs3 = 0;
        pDev->regDelta = 0;
        pDev->intLevel = 0;
        pDev->intVector = NULL;
        pDev->pRegBase = 0;

        break;
    }

    case WINDML_KEYBOARD_DEVICE :
    {
    	printf("Keyboard device do not support right now.\n");
        break;
    }

    case WINDML_POINTER_DEVICE :
    {
    	printf("Pointer device do not support right now.\n");
        break;
    }

    case WINDML_AUDIO_DEVICE :
    {
        /* not implemented yet */
        printf("Audio device do not support right now.\n");
        break;
    }

    default:
    {
    	printf("Error switch item.\n");
        break;
    }
    }
    return (pDev);
}

/******************************************************************************
*
* sysWindMLDevCtrl - special control of the device mode
*
* This routine provides special control features for the device.  This
* function is essentially a catch all to provide control of the device
* where the functionality is provided within a PCI configuration header or
* by board specific registers which may be shared by other functions implemented
* on the target board.
*
* The <function> argument defines the type of function that is to be performed
* and the <pArg> parameter provides the details relating to the function. 
*
* The values for <function> and the interpretation of the <pArg> parameters are:
*
*\is
*\i WINDML_ACCESS_MODE_SET
*       Sets the device's access mode as to whether it is to respond to I/O
*       cycles of memory mapped cycles or both.  The accessibility is provided
*       by the <pArg> parameter which is bit mapped containing the flags
*       WINDML_MEM_ENABLE (enable memory mapped access) and WINDML_IO_ENABLE 
*   (enable I/O access).
*\i WINDML_LCD_MODE_SET
*       Sets the control mode for an LCD that is controllable by an on board
*       register rather than a graphics device register. The mode information
*   is passed through <pArg>. The flags available are WINDML_LCD_ON
*   WINDML_LCD_OFF, WINDML_BACKLIGHT_ON, WINDML_BACKLIGHT_OFF.
*\i WINDML_BUSWIDTH_SET
*   Some boards allow the LCD bus width to be changed dynamically via
*   an FPGA or other configurable logic. This can be done in a board
*   specific manner. The actual bus width will be passed through <pArg>.
*\ie
*
* RETURNS: OK when control operation was success; otherwise ERROR
*
*/

STATUS sysWindMLDevCtrl 
(
    WINDML_DEVICE *pDev,    /* Device to control */
    int function,       /* Type of operation to perform */
    int *pArg           /* Control mode */
)
{
    STATUS status = ERROR;

    if (pDev == NULL)
    {
    return(status);
    }

    switch (function)
    {
       case WINDML_ACCESS_MODE_SET:
       {
             break;
       }

       default:
       {
           break;
       }
    }
    return(status);
}

/******************************************************************************
*
* sysWindMLDevRelease - release a device configuration
*
* This routine will release any resources that were allocated when a  
* device was configured using the <sysWindMLDevGet()> function.  This 
* function will free the memory that was allocated for the WINDML_DEVICE 
* data structure is it were dynamically allocated.  If the data structure was not 
* dynamically allocated, this function will usually be simply a stub.
*
* RETURNS: OK when  operation was success; otherwise ERROR
*
*/

STATUS sysWindMLDevRelease 
(
    WINDML_DEVICE *pDev /* Device to release */
)
{
    if(pDev != NULL)
    free(pDev);

    return(OK);
}

/******************************************************************************
*
* sysWindMLIntConnect - Connect the device interrupt.
*
* This routine connects a routine to the interrupt.
*
* RETURNS: OK or ERROR
*/

STATUS sysWindMLIntConnect
(
    WINDML_DEVICE *pDev,    /* Graphics device to control */
    VOIDFUNCPTR   routine,      /* routine to be called */
    int           parameter     /* parameter to be passed */
)
{
    STATUS status = ERROR;

    if (pDev != NULL && pDev->intVector != NULL && routine != NULL)
    {
        status = intConnect (pDev->intVector, routine, parameter);
    }
    return (status);
}

/******************************************************************************
*
* sysWindMLIntEnable - Enable interrupts.
*
* This routine enables the interrupt.
*
* RETURNS: OK or ERROR
*/

STATUS sysWindMLIntEnable
(
    WINDML_DEVICE *pDev /* Device to control */
)
{
    STATUS status = ERROR;

    if (pDev != NULL && pDev->intLevel != 0)
    {
        s3c2410xIntLvlEnable(pDev->intLevel);
    }

    return (status);
}

/******************************************************************************
*
* sysWindMLIntDisable - Disable interrupts.
*
* This routine disables the interrupt.
*
* RETURNS: OK or ERROR
*/

STATUS sysWindMLIntDisable
(
    WINDML_DEVICE *pDev /* Device to control */
)
{
    STATUS status = ERROR;

    if(pDev != NULL && pDev->intLevel != 0)
    {
    	s3c2410xIntLvlDisable(pDev->intLevel);
    }

    return (status);
}

/*******************************************************************************
*
* sysWindMLHwInit - Perform any necessary hardware initialization in sysHwInit()
*
* RETURNS: OK or ERROR
*/
STATUS sysWindMLHwInit(void)
{
    printf ("sysWindMLHwInit\n");

    return(OK);
}

/* The follow is the pci function, but the CPU has no pci device controller,
*  and the WindML need these function symbol, so we just impletement the blank
*  function.
*/

STATUS pciConfigInByte
(
    int bus,		/* bus number */
    int slot,		/* slot number */
    int function,	/* function number */
    int offset,		/* offset into the configuration space */
    char *data		/* data read from the offset */
)
{
	printf("pciConfigInByte.\n");
}


STATUS pciConfigInWord
(
    int bus,		/* bus number */
    int slot,		/* slot number */
    int function,	/* function number */
    int offset,		/* offset into the configuration space */
    short *data		/* data read from the offset */
)
{
	printf("pciConfigInWord.\n");
}


STATUS pciConfigInLong
(
    int bus,		/* bus number */
    int slot,		/* slot number */
    int function,	/* function number */
    int offset,		/* offset into the configuration space */
    int *data		/* data read from the offset */
)
{

}

STATUS pciConfigOutByte
(
     int bus,		/* bus number */
     int slot,	 	/* slot number */
     int function,	/* function number */
     int offset, 	/* offset into the configuration space */
     char data		/* data written to the offset */
)
{
	printf("pciConfigOutByte.\n");
}

STATUS pciConfigOutWord
(
    int bus,		/* bus number */
    int slot,	 	/* slot number */
    int function, 	/* function number */
    int offset, 	/* offset into the configuration space */
    short data		/* data written to the offset */
)
{
	printf("pciConfigOutWord.\n");
}

STATUS pciConfigOutLong
(
    int bus,	 	/* bus number */
    int slot,	 	/* slot number */
    int function, 	/* function number */
    int offset, 	/* offset into the configuration space */
    int data		/* data written to the offset */
)
{
	printf("pciConfigOutLong.\n");
}



STATUS pciFindDevice
(
    int    vendorId,	/* vendor ID */
    int    deviceId,	/* device ID */
    int    index,	/* desired instance of device */
    int *  pBusNo,	/* bus number */
    int *  pDeviceNo,	/* device number */
    int *  pFuncNo	/* function number */
)
{
	printf("pciFindDevice.\n");
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕欧美区| 99久久精品免费看国产| 亚洲国产一二三| 亚洲色图.com| 中文字幕精品一区二区三区精品| 3d动漫精品啪啪1区2区免费| 在线观看免费亚洲| 亚洲va国产天堂va久久en| 欧美日韩和欧美的一区二区| 91国模大尺度私拍在线视频| 99视频一区二区三区| 成a人片国产精品| www.欧美色图| 色狠狠av一区二区三区| 欧美色欧美亚洲另类二区| 欧美写真视频网站| 91麻豆精品国产无毒不卡在线观看 | 一区二区三区鲁丝不卡| 亚洲丝袜美腿综合| 亚洲成人免费电影| 久久精品国产99国产| 国产成人午夜精品影院观看视频 | 久久97超碰色| eeuss国产一区二区三区| 欧美日韩一级片在线观看| 日韩精品一区二区三区在线| 久久九九国产精品| 亚洲欧美日韩国产手机在线| 麻豆中文一区二区| www..com久久爱| 日韩一区二区麻豆国产| 国产精品久久久久三级| 日韩av电影免费观看高清完整版| 高清不卡在线观看| 欧美一级日韩一级| 亚洲美女视频在线| 国产精品888| 欧美一区国产二区| 91麻豆高清视频| 欧美日韩国产另类不卡| 国产亚洲人成网站| 亚洲色图欧美偷拍| 国产高清在线精品| 精品久久国产字幕高潮| 亚洲国产日韩一区二区| 极品少妇xxxx精品少妇| 欧美日韩在线观看一区二区| 中文字幕欧美激情一区| 成人午夜又粗又硬又大| 久久综合色婷婷| 九一久久久久久| 日韩精品一区二区三区视频| 亚洲电影中文字幕在线观看| 欧美视频日韩视频| 亚洲第一福利一区| 欧美视频在线一区| 午夜精品久久久久久久久久| 欧美色偷偷大香| 日本亚洲欧美天堂免费| 精品久久久三级丝袜| 成人免费黄色在线| 亚洲精品乱码久久久久久久久 | 国产精品情趣视频| 波多野结衣亚洲一区| 一区二区三区日韩| 91精品国产高清一区二区三区| 麻豆91在线播放免费| 精品视频1区2区3区| 一区二区三区在线免费观看| 欧美美女bb生活片| 国产成人精品免费| 亚洲r级在线视频| 国产日产欧美一区| 99精品视频一区| 青青草视频一区| 亚洲素人一区二区| 精品久久久久久无| 高清不卡在线观看av| 日韩精品福利网| 国产精品久久久久久久岛一牛影视| 欧美影院精品一区| 国产在线精品一区在线观看麻豆| 亚洲色图视频网站| 国产精品视频yy9299一区| 欧美嫩在线观看| 日本一区二区免费在线| 成人av网址在线| 国产麻豆一精品一av一免费| 亚洲国产sm捆绑调教视频| 久久久久久久综合色一本| 不卡av在线网| 大胆欧美人体老妇| 国产精品一级在线| 国产一区二区不卡| 国产米奇在线777精品观看| 精品一区二区三区在线视频| 中文字幕一区二区三区在线不卡| 国产女主播在线一区二区| 久久亚洲免费视频| 久久久天堂av| 国产精品免费看片| 亚洲女女做受ⅹxx高潮| 亚洲欧美日韩精品久久久久| 精品免费国产二区三区 | 欧美国产欧美综合| 中文字幕av一区 二区| 国产精品国产三级国产普通话三级 | 欧美亚洲愉拍一区二区| 欧美猛男男办公室激情| 欧美xxx久久| 国产精品久久久久aaaa樱花| 亚洲欧洲av在线| 一区二区三区精密机械公司| 亚洲视频每日更新| 国产午夜精品久久久久久免费视 | 亚洲一区二区在线免费看| 日韩—二三区免费观看av| 国产一区二区主播在线| 91丨porny丨国产入口| 欧美日韩美少妇| 欧美肥妇bbw| 亚洲免费观看在线视频| 麻豆freexxxx性91精品| 色女孩综合影院| 精品国产91亚洲一区二区三区婷婷 | 视频一区免费在线观看| 91小视频免费观看| 国产欧美一区二区精品婷婷| 亚洲福中文字幕伊人影院| 欧美日韩一区二区三区四区 | 日日夜夜免费精品| 狠狠色丁香九九婷婷综合五月| 69久久99精品久久久久婷婷| 1024国产精品| 欧美最新大片在线看| 一区二区三区在线观看动漫| 91黄视频在线观看| 午夜视黄欧洲亚洲| 日韩欧美黄色影院| 粉嫩嫩av羞羞动漫久久久| 国产精品久久久久久亚洲毛片| 国产激情一区二区三区四区| 国产精品剧情在线亚洲| 色婷婷av一区二区三区大白胸| 一区二区成人在线观看| 欧美日韩国产美| 国产成人一区在线| 一区二区三区在线播| 91精品国产综合久久久久久漫画| 美女诱惑一区二区| 国产精品免费人成网站| 91精品婷婷国产综合久久性色| 国产成人亚洲精品青草天美 | 91传媒视频在线播放| 亚洲gay无套男同| 久久综合丝袜日本网| 欧美在线一区二区| 国产成人精品免费看| 另类中文字幕网| 亚洲v中文字幕| 亚洲免费观看在线观看| 久久精品欧美一区二区三区不卡| 欧美三级视频在线观看| 不卡电影免费在线播放一区| 青青草国产精品97视觉盛宴| 亚洲综合无码一区二区| 欧美国产1区2区| 日韩精品一区二区三区中文不卡| 欧美色欧美亚洲另类二区| av在线一区二区三区| 国产精品亚洲成人| 久久电影网电视剧免费观看| 亚洲成人精品在线观看| 亚洲高清免费在线| 亚洲午夜免费电影| 亚洲午夜精品网| 亚洲第一精品在线| 日日夜夜免费精品| 蜜桃精品视频在线| 国产成人精品一区二区三区四区 | 中文字幕免费观看一区| 18欧美乱大交hd1984| 亚洲自拍偷拍综合| 天天色天天爱天天射综合| 五月天婷婷综合| 另类调教123区| 国产在线不卡视频| 色综合天天视频在线观看 | 亚洲激情欧美激情| 一区二区高清免费观看影视大全 | 亚洲欧洲国产专区| 亚洲电影一区二区三区| 狠狠色狠狠色综合系列| 成人黄色片在线观看| 在线成人小视频| 欧美国产日本韩| 丝袜国产日韩另类美女| 国产91丝袜在线观看| 精品视频一区二区三区免费| 久久久久国产精品麻豆ai换脸|