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

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

?? sysmotsccend.c

?? WINDRIVER 8260 ATM BSP
?? C
字號:
/* sysMotSccEnd.c - system configuration module for m8260SccEnd driver */ /* Copyright 1984-1999 Wind River Systems, Inc. */#include "copyright_wrs.h" /*modification history--------------------01c,16jan03,gjc  SPR#85071 and SPR#85071 :Added mechanism to support                 initial duplex setting.01b,23sep02,gjc  Fixing SPRs #81417 and #82303 - sysSccEnetDisable         sets bits in portB instead of portD. Always use         global mac[1] for scc0. Fixes Duplicate MAC.01a,07mar02,kab  SPR 70817: *EndLoad returns NULL on failure01b,10may01, g_h  rename to sysMotSccEnd.c01a,08mar01, g_h  created from sbc8260/sysMotFccEnd.c*/ /*DESCRIPTIONThis is the WRS-supplied configuration module for the VxWorksmotCpmEnd END driver.It performs the dynamic parameterization of the motCpmEnd driver.This technique of 'just-in-time' parameterization allows driverparameter values to be declared as any other defined constants ratherthan as static strings.*/#include "vxWorks.h"#include "config.h" #include "vmLib.h"#include "stdio.h"#include "sysLib.h"#include "logLib.h"#include "stdlib.h"#include "string.h"#include "end.h"#include "intLib.h"#include "drv/mem/m82xxDpramLib.h" #include "drv/end/m8260SccEnd.h"/* defines */#ifdef INCLUDE_MOTSCCEND#define MOT_SCC_INTVEC_NUM  0x23  /* Interrupt vector number */#define MOT_SCC_NUM         0x1   /* SCC number */#define MOT_SCC_TBD_NUM     0x20  /* number of transmit buffer descriptors (TBD)*/#define MOT_SCC_RBD_NUM     0x20  /* number of receive buffer descriptors (RBD)*//* imports */ IMPORT END_OBJ * m8260SccEndLoad (char *);IMPORT UINT32    sysPCGet (void);/* forward declarations */void   sysSccEnetDisable (int unit);void   sysSccEnetIntDisable (int unit);STATUS sysSccEnetEnable ( int unit );STATUS sysSccEnetAddrGet (int  unit, UINT8 *addr);STATUS sysSccEnetCommand (int  unit, UINT16 command);void   sysSccEnetIntEnable (int unit);void   sysSccEnetIntClear (int unit);/************************************************************************* sysMotSccEndLoad - load an istance of the m8260SccEnd driver** This routine loads the m8260SccEnd driver with proper parameters. It also* reads the BCSR3 to find out which type of processor is being used, and* sets up the load string accordingly.** The END device load string formed by this routine is in the following* format.* <motCpmAddr>:<ivec>:<sccNum>:<txBdNum>:<rxBdNum>:<txBdBase>:<rxBdBase>:* <bufBase>** .IP <motCpmAddr>* Internal memory address* .IP <ivec>* Interrupt vector * .IP <sccNum>* SCC number being used* .IP <txBdNum>* number of TBDs or NULL* .IP <rxBdNum>* number of RBDs or NULL* .IP <txBdBase>* base location of the TBDs* .IP <rxBdBase>* base location of the RBDs* .IP <bufBase>* address of the shared memory region* .IP <flags>* SCC_USR_RUNNING_FROM_ROM* SCC_USR_DUPLEX_HALF or SCC_USR_DUPLEX_FULL ** This routine only loads and initializes one instance of the device.* If the user wishes to use more than one m8260SccEnd devices, this routine* should be changed. * The driver interface supports setting the duple mode to half or full via the flag* load string parameter. The default is half duplex.** RETURNS: pointer to END object or NULL.** SEE ALSO: m8260EndLoad ()*/ END_OBJ * sysMotSccEndLoad    (    char * pParamStr,   /* ptr to initialization parameter string */    void * unused       /* unused optional argument */    )    {    /*     * The motCpmEnd driver END_LOAD_STRING should be:     * <motCpmAddr>:<ivec>:<sccNum>:<txBdNum>:<rxBdNum>:<txBdBase>:     * <rxBdBase>:<bufBase>:<userFlags>     * Note that unit string is prepended by the mux, so we     * don't put it here.     */     char * pStr = NULL;    char   paramStr [200];    UINT32 regPC;    UINT32 motSccTxBufDescBase;    UINT32 motSccRxBufDescBase;    UINT32 motSccBufBase;    UINT32 motSccFlags;    static char motSccEndParamTemplate [] = "0x%x:0x%x:%d:0x%x:0x%x:0x%x:0x%x:0x%x:0x%x";    END_OBJ * pEnd;     if (strlen (pParamStr) == 0)        {        /*         * muxDevLoad() calls us twice.  If the string is         * zero length, then this is the first time through         * this routine.         */        pEnd = (END_OBJ *) m8260SccEndLoad (pParamStr);        }    else        {    regPC = sysPCGet ();    motSccFlags = 0;    if ((regPC & ROM_BASE_ADRS) == ROM_BASE_ADRS)        {        /* We are running from ROM */                    motSccBufBase = 0x04100000;               /* BD in local bus */        motSccFlags   |= SCC_USR_RUNNING_FROM_ROM; /* user flags */        }    else        {        /* We are running from RAM */                    motSccBufBase = -1UL; /* BD in 60x bus */        }    motSccFlags |= SCC_USR_DUPLEX_HALF;  /* user flags */                /*         * On the second pass through here, we actually create         * the initialization parameter string on the fly.         * Note that we will be handed our unit number on the         * second pass and we need to preserve that information.         * So we use the unit number handed from the input string.         */    if ((motSccTxBufDescBase = (UINT32)m82xxDpramAlignedMalloc (0x280,8)) == 0)        return 0;    if((motSccRxBufDescBase = (UINT32)m82xxDpramAlignedMalloc (0x280,8)) == 0)       return 0;        pStr = strcpy (paramStr, pParamStr);         /* Now, we get to the end of the string */         pStr += strlen (paramStr);                 /* finish off the initialization parameter string */        sprintf (pStr, motSccEndParamTemplate,                 (UINT) vxImmrGet (),                 MOT_SCC_INTVEC_NUM,                 MOT_SCC_NUM,                 MOT_SCC_TBD_NUM,                    MOT_SCC_RBD_NUM,                    motSccTxBufDescBase,                 motSccRxBufDescBase,                 motSccBufBase,                 motSccFlags);         if ((pEnd = (END_OBJ *) m8260SccEndLoad  (paramStr)) == (END_OBJ *)NULL)            {            logMsg ("Error: m8260SccEndLoad  failed to load driver\n",            0, 0, 0, 0, 0, 0);            }        }     return (pEnd);    }/************************************************************************* sysSccEnetDisable - disable the Ethernet controller** This routine is expected to perform any target specific functions required* to disable the Ethernet controller.  This usually involves disabling the* Transmit Enable (TENA) signal.** RETURNS: N/A*/void sysSccEnetDisable    (    int         unit    /* not used - only slave SCC1 is wired to port */    )    {    /*                                                                      */    /* Get the physical location of the IMMR register                       */    /*                                                                      */    int immrVal = vxImmrGet() ;    *M8260_IOP_PDPAR(immrVal) &= ~(PD29);    /* clear port D pin 29 -> RTS1 = *TENA */        }/************************************************************************* sysSccEnetIntDisable - disable the Ethernet interface interrupt** This routine disable the interrupt for the Ethernet interface specified* by <unit>.** RETURNS: N/A.*/void sysSccEnetIntDisable    (    int     unit    )    {    /*                                                                      */    /* Get the physical location of the IMMR register                       */    /*                                                                      */    int immrVal = vxImmrGet ();    *M8260_SIMR_L(immrVal) &= ~0x00800000;   /* Mask SCC1 */    }/************************************************************************* sysSccEnetEnable - enable the Ethernet controller** This routine is expected to perform any target specific functions required* to enable the Ethernet controller.  These functions typically include* enabling the Transmit Enable signal (TENA) and connecting the transmit* and receive clocks to the SCC.** RETURNS: OK, or ERROR if the Ethernet controller cannot be enabled.*/STATUS sysSccEnetEnable    (    int     unit    /* not used - only slave SCC1 is wired to port */    )    {    UINT32 temp;    int immrVal = vxImmrGet ();    /*     * Configure port D pins to enable TXD1 and RXD1.     *     * Set PPARD[30,31] and PDIRD[30] and clear PDIRD[31]      * and PSORD[31].  Set PSORD[30].     */    *M8260_IOP_PDPAR(immrVal) |=  (PD30 | PD31);  /* Set PD30 and PD31 */    *M8260_IOP_PDDIR(immrVal) |=  (PD30);         /* Set PD30 */    *M8260_IOP_PDDIR(immrVal) &= ~(PD31);         /* Clear PD31 */    *M8260_IOP_PDSO(immrVal)  |=  (PD30);         /* Set PD30 */    *M8260_IOP_PDSO(immrVal)  &= ~(PD31);         /* Clear PD31 */    /*     * Configure ports C and D to enable TENA1 (RTS1), CLSN1 (CTS1),     * and RENA1 (CD1).     *     * Set PPARD[29], PPARC[14,29], PDIRD[29], and PSORC[29] and clear      * PDIRC[14,29], PSORC[14] and PSORD[29].     */    *M8260_IOP_PDPAR(immrVal) |=  (PD29);         /* Set PD29 */    *M8260_IOP_PCPAR(immrVal) |=  (PC14 | PC29);  /* Set PC14 and PC29 */    *M8260_IOP_PDDIR(immrVal) |=  (PD29);         /* Set PD29 */    *M8260_IOP_PCSO(immrVal)  |=  (PC29);         /* Set PC29 */    *M8260_IOP_PCDIR(immrVal) &= ~(PC14 | PC29);  /* Clear PC14 and PC29 */    *M8260_IOP_PCSO(immrVal)  &= ~(PC14);         /* Clear PC14 */    *M8260_IOP_PDSO(immrVal)  &= ~(PD29);         /* Clear PD29 */    /*     * Configure port C pins to enable CLK11 and CLK12.     *     * Set PPARC[20,21] and clear PDIRC[20,21] and PSORC[20,21].     */    *M8260_IOP_PCPAR(immrVal) |=  (PC20 | PC21);  /* Set PC20 and PC21 */    *M8260_IOP_PCDIR(immrVal) &= ~(PC20 | PC21);  /* Clear PC20 and PC21 */    *M8260_IOP_PCSO(immrVal)  &= ~(PC20 | PC21);  /* Clear PC20 and PC21 */    /*     * Connect CLK11 to the SCC1 receiver and CLK12 to the     * transmitter using the CPM mux.  Also, connect the SCC1     * to the NMSI.     *     * Program CMXSCR[R1CS] to 0b100 and CMXSCR[T1CS] to 0b101.     * Clear CMXSCR[SC1].     */    temp = (*M8260_CMXSCR(immrVal) & 0x00ffffff);    *M8260_CMXSCR(immrVal) = (temp | 0x25000000);     return (OK);    }/************************************************************************* sysSccEnetAddrGet - gets the 6 byte ethernet address** The routine gets the 6 byte ethernet address used by the ethernet device.** RETURNS: OK, or ERROR*/STATUS sysSccEnetAddrGet    (    int     unit ,           UINT8 * pAddr   /* LOcation address is returned in                 */    )    {    /* need extra room for a 'EOS' -- driver may not provide it */    UINT8   eAdrs[MAC_ADRS_LEN + 2];    STATUS  status;    status = sysEnetAddrGet (1,eAdrs);     if (status == OK)    {    memcpy (pAddr,eAdrs,MAC_ADRS_LEN);        }    return status;    }/************************************************************************* sysSccEnetCommand - issue a command to the Ethernet interface controller** The routine issue a command to the Ethernet interface controller.** RETURNS: OK, or ERROR if the Ethernet controller could not be restarted.*/STATUS sysSccEnetCommand    (    int     unit,    UINT16  command    )    {    int immrVal = vxImmrGet ();    while (*M8260_CPCR(immrVal) & M8260_CPCR_FLG);    *M8260_CPCR(immrVal) = M8260_CPCR_PAGE(M8260_CPCR_PAGE_SCC1) | \                   M8260_CPCR_SBC(M8260_CPCR_SBC_SCC1)   | \                           command                               | \               M8260_CPCR_FLG;        while (*M8260_CPCR(immrVal) & M8260_CPCR_FLG);    return (OK);    }/************************************************************************* sysSccEnetIntEnable - enable the Ethernet interface interrupt** This routine enable the interrupt for the Ethernet interface specified* by <unit>.** RETURNS: N/A.*/void sysSccEnetIntEnable    (    int     unit    )    {    /*                                                                      */    /* Get the physical location of the IMMR register                       */    /*                                                                      */    int immrVal = vxImmrGet ();    *M8260_SIMR_L(immrVal) |= 0x00800000;   /* Enable SCC1 */    }/************************************************************************* sysSccEnetIntClear - clear the Ethernet interface interrupt** This routine clears the interrupt for the Ethernet interface specified* by <unit>.** RETURNS: N/A.*/void sysSccEnetIntClear    (    int     unit    )    {    /*                                                                      */    /* Get the physical location of the IMMR register                       */    /*                                                                      */    int immrVal = vxImmrGet ();    *M8260_SIPNR_L(immrVal) = 0x00800000;    }#endif /* INCLUDE_MOTSCCEND */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕欧美国产| 日韩精品一区二区三区三区免费| 亚洲国产成人午夜在线一区| 国产九色精品成人porny| 久久精品亚洲一区二区三区浴池| 国产成a人无v码亚洲福利| 国产亚洲综合色| 97精品国产露脸对白| 亚洲免费在线视频| 欧美一区二区私人影院日本| 另类小说欧美激情| 国产蜜臀av在线一区二区三区| 成人av在线观| 午夜国产精品一区| 久久亚洲一区二区三区四区| 99久久国产综合精品色伊| 亚洲成人手机在线| 久久美女高清视频| 色哟哟一区二区在线观看 | 国产丶欧美丶日本不卡视频| 国产精品久久久久久户外露出| a亚洲天堂av| 日本午夜一区二区| 中文字幕一区在线| 欧美一级精品大片| 99国产麻豆精品| 久久99蜜桃精品| 亚洲天堂免费在线观看视频| 91麻豆精品国产91久久久更新时间 | 天堂va蜜桃一区二区三区漫画版| 精品99999| 91福利在线播放| 国产一区二区三区在线观看免费视频| 国产精品不卡在线观看| 337p亚洲精品色噜噜| 不卡大黄网站免费看| 热久久免费视频| 亚洲丝袜另类动漫二区| ww久久中文字幕| 欧美日韩亚洲国产综合| www.av精品| 国产麻豆精品视频| 日韩电影免费一区| 亚洲一区二区3| 国产精品高潮呻吟| 久久综合丝袜日本网| 欧美人伦禁忌dvd放荡欲情| 99久久精品免费| 国产精品综合av一区二区国产馆| 亚洲mv在线观看| 有码一区二区三区| 国产亚洲一区二区在线观看| 日韩一级视频免费观看在线| 欧美三区在线观看| 97久久精品人人做人人爽| 国产iv一区二区三区| 精品在线亚洲视频| 免费欧美在线视频| 天天色天天操综合| 亚洲尤物在线视频观看| 136国产福利精品导航| 国产精品欧美一区喷水| 精品成人在线观看| 精品国产区一区| 欧美mv日韩mv| ww亚洲ww在线观看国产| 日韩免费福利电影在线观看| 91麻豆精品国产综合久久久久久| 色婷婷综合久久| 91高清在线观看| 色先锋久久av资源部| 91欧美一区二区| 色天天综合色天天久久| 色综合久久久久综合99| 色偷偷成人一区二区三区91| 色婷婷国产精品| 欧美日韩一区视频| 日韩女优av电影| 欧美丰满高潮xxxx喷水动漫| 制服丝袜亚洲网站| 日韩丝袜情趣美女图片| 精品国产1区2区3区| 久久综合九色综合久久久精品综合| 精品va天堂亚洲国产| 久久精品一区八戒影视| 国产精品乱码一区二三区小蝌蚪| 中文字幕不卡在线观看| 亚洲激情中文1区| 婷婷激情综合网| 美洲天堂一区二卡三卡四卡视频| 激情深爱一区二区| 成人免费视频一区二区| 色先锋久久av资源部| 欧美精品久久天天躁| 欧美成人性福生活免费看| 久久精品日产第一区二区三区高清版 | 狠狠v欧美v日韩v亚洲ⅴ| 国产成人综合在线观看| 91视频xxxx| 欧美一级免费观看| 2023国产精品视频| 亚洲欧美日韩国产中文在线| 午夜国产不卡在线观看视频| 久久99精品久久久久久国产越南 | av在线一区二区三区| 欧美曰成人黄网| 欧美一区午夜精品| 国产欧美一区二区精品性色| 一区二区三区四区视频精品免费 | 91国产丝袜在线播放| 日韩一级高清毛片| 国产人久久人人人人爽| 亚洲国产毛片aaaaa无费看| 日本亚洲天堂网| 成人av免费在线| 欧美日韩精品一区二区天天拍小说| 欧美mv日韩mv国产网站app| 1024国产精品| 精品一区二区精品| 日本高清不卡一区| 久久影院午夜论| 亚洲大片免费看| 成人福利在线看| 日韩欧美激情一区| 亚洲精品成人在线| 国产91高潮流白浆在线麻豆 | 91社区在线播放| 亚洲精品一区二区在线观看| 亚洲激情图片一区| 国产成人在线免费观看| 欧美丰满美乳xxx高潮www| 午夜影院久久久| 国产成人啪午夜精品网站男同| 欧美日韩专区在线| 国产精品毛片久久久久久| 免费在线观看不卡| 欧美在线不卡视频| 欧美国产激情二区三区 | 午夜精品成人在线视频| va亚洲va日韩不卡在线观看| 精品美女一区二区| 日韩精品久久理论片| 欧美性一二三区| 亚洲色图另类专区| 岛国一区二区三区| 国产网红主播福利一区二区| 美国三级日本三级久久99| 欧美日韩久久久| 亚洲狠狠丁香婷婷综合久久久| 成人午夜av电影| 国产欧美日本一区视频| 毛片基地黄久久久久久天堂| 欧美影院精品一区| 亚洲男人电影天堂| 色婷婷精品大在线视频| 亚洲日本在线观看| 一本久久精品一区二区| 中文字幕一区二区三区不卡在线| 福利一区二区在线| 欧美国产成人精品| 成人性生交大片免费看中文 | 亚洲国产岛国毛片在线| 国产精品资源在线| 久久久久久亚洲综合影院红桃| 国产主播一区二区三区| 精品国产sm最大网站| 精品一区二区成人精品| 久久综合色婷婷| 国产成人综合视频| 中文在线资源观看网站视频免费不卡 | 视频在线观看一区二区三区| 欧美绝品在线观看成人午夜影视| 亚洲国产综合在线| 91精品国产综合久久蜜臀| 美女视频第一区二区三区免费观看网站 | 日韩欧美第一区| 精品一区中文字幕| 日本一区二区三区久久久久久久久不| 国产真实精品久久二三区| 久久久www成人免费毛片麻豆| 美国三级日本三级久久99| 久久综合九色综合欧美亚洲| 国产999精品久久久久久| √…a在线天堂一区| 欧洲色大大久久| 裸体歌舞表演一区二区| 欧美激情中文字幕一区二区| 色婷婷av一区二区三区gif| 亚洲成人免费视频| 久久综合99re88久久爱| 不卡的av在线播放| 亚洲国产美女搞黄色| 欧美电影免费观看高清完整版在 | 亚洲免费伊人电影| 欧美人与禽zozo性伦| 国产一区二区网址| 亚洲欧美韩国综合色| 欧美一区三区二区| 成人毛片视频在线观看| 午夜国产精品一区|