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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sysserial.c

?? powerpc 系列cpu mpc860ads vxworks BSP 得花錢買的
?? C
字號:
/* sysSerial.c -  MPC860 SMC UART BSP serial device initialization *//* Copyright 1984-1998 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01l,29jan02,dtr  Changing vxImmrGet to vxImmrIsbGet.01k,29oct01,dtr  Removing diab compiler warnings.01j,03oct00,js  Added support for 850SARDB cpu.01i,29sep00,js  Adding changes for 850.01h,19mar99,cn   only SMC1 is initialized on MPC823/850 (SPR# 25839).01g,19feb99,cn   fixed mangen error.01f,28jan99,cn   Added support for the second SMC channel (SPR# 10005).01e,08may98,gls  Added clearing of serial interrupts to sysSerialHwInit01d,06nov96,tpr  replaced SYS_CPU_FREQ by BRGCLK_FREQ.01c,20jun96,tpr  added sysSerialReset().01b,28may96,dzb  tweaked setting of portB registers.01a,19apr86,cah  created*//*The sysSerial.c file is normally included as part of the sysLib.c file.This code segment configures the serial ports for the BSP.This BSP can support up to two SMC channels in UART mode only.*/ #include "vxWorks.h"#include "iv.h"#include "intLib.h"#include "config.h"#include "sysLib.h"#include "drv/sio/ppc860Sio.h"#include "drv/multi/ppc860Cpm.h"#include "ads860.h"#include "arch/ppc/vxPpcLib.h"/* defines *//*  * the macros below define parameters describing the configuration of * the SMCs channels in the PPC860's DPRAM, for instance the offset * of the transmit buffer descriptors (TBD), receive buffer descriptors * (RBD), and so on. The user may redefine them to best suit its needs. * He should be aware of the location of other peripherals's parameters * within the DPRAM (SCC1, etc.). *//* offset from DPRAM of SMC1's TBDs */#define SMC1_TBD_OFF		0x200/* offset from DPRAM of SMC1's RBDs */#define SMC1_RBD_OFF		(SMC1_TBD_OFF + 0x10)/* offset from DPRAM of SMC1's Tx buffers */#define SMC1_TX_BUF_OFF		0x300/* offset from DPRAM of SMC1's Rx buffers */#define SMC1_RX_BUF_OFF		(SMC1_TX_BUF_OFF + 0x80)/* number of SMC1's TBDs */#define SMC1_TBD_NUM		0x01/* number of SMC1's RBDs */#define SMC1_RBD_NUM		0x10/* offset from DPRAM of SMC2's TBDs */#define SMC2_TBD_OFF		0x400/* offset from DPRAM of SMC2's RBDs */#define SMC2_RBD_OFF		(SMC2_TBD_OFF + 0x10)/* offset from DPRAM of SMC2's Tx buffers */#define SMC2_TX_BUF_OFF		0x500/* offset from DPRAM of SMC2's Rx buffers */#define SMC2_RX_BUF_OFF		(SMC2_TX_BUF_OFF + 0x80)/* number of SMC2's TBDs */#define SMC2_TBD_NUM		0x01/* number of SMC2's RBDs */#define SMC2_RBD_NUM		0x10/* size of the SMC1 transmit buffer */#define SMC1_TX_BUF_SZ		0x01/* size of the SMC2 transmit buffer */#define SMC2_TX_BUF_SZ		0x01/* device initialization structure */ typedef struct    {    UINT32	smcTbdOff;		/* offset of the TBDs for this smc */    UINT32	smcRbdOff;		/* offset of the RBDs for this smc */    UINT32	smcTbdNum;		/* number of TBDs for this smc */    UINT32	smcRbdNum;		/* number of RBDs for this smc */    UINT32	smcTxBufOff;		/* offset of the Tx buf for this smc */    UINT32	smcRxBufOff;		/* offset of the Rx buf for this smc */    UINT32	smcTxBufSz;		/* size of the Tx buf for this smc */    } PPC860SMC_PARMS; /* forward declaration */ /* Local data structures */ static UINT8	chanNum = NUM_TTY;	/* number of channels actually used */static PPC860SMC_PARMS ppc860SmcParms [] =    {       {SMC1_TBD_OFF, SMC1_RBD_OFF, SMC1_TBD_NUM, SMC1_RBD_NUM,	SMC1_TX_BUF_OFF, SMC1_RX_BUF_OFF, SMC1_TX_BUF_SZ},       {SMC2_TBD_OFF, SMC2_RBD_OFF, SMC2_TBD_NUM, SMC2_RBD_NUM,	SMC2_TX_BUF_OFF, SMC2_RX_BUF_OFF, SMC2_TX_BUF_SZ},    }; static PPC860SMC_CHAN	ppc860Chan [NUM_TTY];/******************************************************************************** sysSerialHwInit - initialize the BSP serial devices to a quiesent state** This routine initializes the BSP serial device descriptors and puts the* devices in a quiesent state.  It is called from sysHwInit() with* interrupts locked.** Both the SMC serial channels are initialized if the variable chanNum * equals two. In this case, SMC1 uses BRG1 and SMC2 uses BRG2. However, * if using an MPC823/850 processor, only SMC1 is initialized.** Data Parameter Ram layout:**          -----------------------------*          |                           | DPRAM base *          |                           |*          |                           |*          |                           |*          |---------------------------|*          | 8 bytes per descriptor    | SMC1 Tx Buffer Descriptor (0x2200)*          |---------------------------|*          |                           |*          |---------------------------|*          | 16 descriptors @          | SMC1 Rx Buffer Descriptors (0x2210)*          | 8 bytes per descriptor    | *          |                           |*          |---------------------------|*          |                           | end SMC1 Rx BDs (0x2290)*          |                           |*          |                           |*          |---------------------------|*          | 80 bytes allowed          | SMC1 Tx Buffer (0x2300 + DPRAM base )*          |---------------------------|*          | one receive char/buffer   | SMC1 Rx Buffer (0x2380 + DPRAM base )*          |---------------------------|*          |                           |*          |                           |*          |---------------------------|*          | 8 bytes per descriptor    | SMC2 Tx Buffer Descriptor (0x2400)*          |---------------------------|*          |                           |*          |---------------------------|*          | 16 descriptors @          | SMC2 Rx Buffer Descriptors (0x2410)*          | 8 bytes per descriptor    | *          |                           |*          |---------------------------|*          |                           | end SMC2 Rx BDs (0x2490)*          |                           |*          |                           |*          |---------------------------|*          | 80 bytes allowed          | SMC2 Tx Buffer (0x2500 + DPRAM base )*          |---------------------------|*          | one receive char/buffer   | SMC2 Rx Buffer (0x2580 + DPRAM base )*          |---------------------------|*          |                           |*          |                           |*          |                           |*          |                           |*          |---------------------------|*          | 34 bytes of parameter info| SMC1 Parameter Area (0x3e80)*          | including Rx and Tx BD    | *          | pointers, func codes      |*          | etc...                    |*          |---------------------------|*          |                           |*          |---------------------------|*          | 34 bytes of parameter info| SMC2 Parameter Area (0x3f80)*          | including Rx and Tx BD    | *          | pointers, func codes      |*          | etc...                    |*          |---------------------------|*          |                           |*          |                           |**** RETURNS: N/A*/ void sysSerialHwInit (void)    {    int		i;		/* an index */    /* enable serial I/O on the board */    *BCSR1 &= ~(BCSR1_RS232_EN_L);    /* If running an 823 or an 850, use only SMC1 */    if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||	((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850SARDB_MASK) ||        ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))        {	chanNum = 1;	}    if (chanNum == 2)	*BCSR1 &= ~(BCSR1_RS232_2_EN_L);    /* intialize the chips device descriptors */    for (i = 0; i < chanNum; i++)        {	UINT32 regBase;	/* BRGCLK freq (Hz) */	ppc860Chan [i].clockRate      = BRGCLK_FREQ;	    	/* IMMR reg has base adr */	ppc860Chan [i].regBase        = vxImmrIsbGet();  	    	regBase = ppc860Chan [i].regBase;	/* use BRG1 for channel 1 and BRG2 for channel 2 */	ppc860Chan [i].bgrNum         = (i + 1);                  	/* SMC wired for rs232 */	ppc860Chan [i].uart.smcNum    = (i + 1);                  	/* init the number of TBDs */	ppc860Chan [i].uart.txBdNum   = ppc860SmcParms[i].smcTbdNum;                  	/* init the number of RBDs */	ppc860Chan [i].uart.rxBdNum   = ppc860SmcParms[i].smcRbdNum;               	/* transmit BD base adrs */	ppc860Chan [i].uart.txBdBase  = (SMC_BUF *) 					 (MPC860_REGB_OFFSET + 					 ppc860SmcParms[i].smcTbdOff);	/* receive BD base adrs */	ppc860Chan [i].uart.rxBdBase  = (SMC_BUF *) 					 (MPC860_REGB_OFFSET + 					 ppc860SmcParms[i].smcRbdOff);	/* tx buf base */	ppc860Chan [i].uart.txBufBase = (u_char *) 					 (MPC860_DPRAM_BASE (regBase)					 + ppc860SmcParms[i].smcTxBufOff);	/* rx buf base */	ppc860Chan [i].uart.rxBufBase = (u_char *) 					 (MPC860_DPRAM_BASE (regBase)					 + ppc860SmcParms[i].smcRxBufOff);	/* transmit buffer size */	ppc860Chan [i].uart.txBufSize = ppc860SmcParms[i].smcTxBufSz;	/* DPRAM addr of SMC1 params */	ppc860Chan [i].uart.pSmc = (SMC *) ((UINT32) PPC860_DPR_SMC1 					    (MPC860_DPRAM_BASE (regBase)) 					    + (i * 0x100));	/* SMCMR1 for SMC1 */	ppc860Chan [i].uart.pSmcReg = (SMC_REG *) 				       ((UINT32) MPC860_SMCMR1 (regBase)				       + (i * 0x10));	/* Mask interrupts */	ppc860Chan [i].uart.pSmcReg->smcm = 0;              	ppc860Chan [i].pBaud = (VINT32 *) ((VINT32) MPC860_BRGC1 (regBase)					    + (i * 4));	ppc860Chan [i].channelMode = 0;	/* select RS232 pins */	*MPC860_PBPAR(regBase) |= 0xC0 << (i * 4);       	/* set it to normal operations */	*MPC860_SDCR(regBase) = SDCR_RAID_BR5;           	/* reset the chip */	ppc860DevInit(&(ppc860Chan [i]));        }    }/******************************************************************************** sysSerialHwInit2 - connect BSP serial device interrupts** This routine connects the BSP serial device interrupts.  It is called from* sysHwInit2().  Serial device interrupts could not be connected in* sysSerialHwInit() because the kernel memory allocator was not initialized* at that point, and intConnect() calls malloc().** RETURNS: N/A*/ void sysSerialHwInit2 (void)    {    int		i;	/* an index */    /* connect serial interrupts */    for (i = 0; i < chanNum; i++)	{	switch (i)	    {	    case 0:		(void) intConnect (IV_SMC1, (VOIDFUNCPTR) ppc860Int, 				   (int) &ppc860Chan [i]);		break;	    case 1:		(void) intConnect (IV_SMC2_PIP, (VOIDFUNCPTR) ppc860Int, 				   (int) &ppc860Chan [i]);		break;	    default:		return;	    }	*CIMR(vxImmrIsbGet()) |= (CIMR_SMC1 >> i);	}    }/******************************************************************************** sysSerialChanGet - get the SIO_CHAN device associated with a serial channel** This routine gets the SIO_CHAN device associated with a specified serial* channel.** RETURNS: A pointer to the SIO_CHAN structure for the channel, or ERROR* if the channel is invalid.*/SIO_CHAN * sysSerialChanGet    (    int channel		/* serial channel */    )    {    if (channel >= chanNum)	return ((SIO_CHAN *) ERROR);    return ((SIO_CHAN *) &ppc860Chan [channel]);    }/********************************************************************************* sysSerialReset - reset the serail device ** This function calls sysSerialHwInit() to reset the serail device** RETURNS: N/A**/void sysSerialReset (void)    {    sysSerialHwInit ();    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产小视频| 成人高清在线视频| 亚洲日本青草视频在线怡红院| 欧美成人一区二区| 日韩午夜av电影| 国产 日韩 欧美大片| 国产乱人伦精品一区二区在线观看 | 精品国产三级a在线观看| 欧美高清性hdvideosex| 欧美夫妻性生活| 日韩欧美中文一区二区| 日韩一区二区三区电影在线观看 | 视频一区二区中文字幕| 亚洲国产精品人人做人人爽| 午夜精品福利一区二区蜜股av | 国产91在线观看| 成人午夜av电影| 色悠悠久久综合| 欧美久久久久久久久中文字幕| 日韩欧美久久久| 国产女人aaa级久久久级| 综合欧美一区二区三区| 性做久久久久久免费观看| 裸体在线国模精品偷拍| 国产成人av一区| 欧美主播一区二区三区| 日韩欧美国产精品| 欧美国产亚洲另类动漫| 亚洲一区欧美一区| 精品亚洲免费视频| 97se亚洲国产综合自在线不卡| 欧美日韩中文精品| 国产午夜亚洲精品午夜鲁丝片| 一区二区三区国产精品| 免费在线观看一区| av电影在线观看完整版一区二区| 欧美精品一卡二卡| 国产精品久久久久久久第一福利| 日本在线播放一区二区三区| 国产激情一区二区三区桃花岛亚洲| 97精品久久久午夜一区二区三区 | 久久国产精品免费| 色综合亚洲欧洲| 精品处破学生在线二十三| 亚洲愉拍自拍另类高清精品| 国产盗摄精品一区二区三区在线| 欧美精品久久99| 亚洲视频1区2区| 国产精品一区二区你懂的| 欧美三级中文字| 国产精品二区一区二区aⅴ污介绍| 日韩av电影免费观看高清完整版| 不卡电影免费在线播放一区| 欧美成人精品3d动漫h| 亚洲1区2区3区4区| 色综合天天综合网天天看片| 久久理论电影网| 秋霞成人午夜伦在线观看| 欧美性猛片xxxx免费看久爱| 中文字幕中文乱码欧美一区二区 | 亚洲最色的网站| 成人国产精品视频| 久久久青草青青国产亚洲免观| 日韩激情视频网站| 欧美日韩精品一区二区天天拍小说 | 亚洲午夜免费电影| av电影在线观看不卡| 国产精品久久久久久久午夜片| 国产又粗又猛又爽又黄91精品| 在线不卡欧美精品一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 国产福利一区二区三区在线视频| 精品少妇一区二区三区视频免付费 | 精品理论电影在线观看| 亚洲午夜免费视频| 欧美日韩三级视频| 亚洲成精国产精品女| 在线观看亚洲专区| 亚洲午夜免费电影| 欧美精品一卡两卡| 另类人妖一区二区av| 欧美电视剧免费观看| 久久99久久精品欧美| www成人在线观看| 国产精品99久久久久久宅男| 国产偷v国产偷v亚洲高清| 成人开心网精品视频| 1024亚洲合集| 欧美午夜理伦三级在线观看| 日韩精品久久理论片| 亚洲精品在线一区二区| 国产一区二区三区香蕉| 国产精品毛片大码女人| 91一区二区在线观看| 亚洲bdsm女犯bdsm网站| 日韩丝袜情趣美女图片| 激情综合网最新| 国产精品无码永久免费888| eeuss国产一区二区三区| 亚洲午夜精品17c| 欧美一区二区视频在线观看2022| 极品美女销魂一区二区三区| 中文字幕欧美区| 欧美日韩aaa| 国产a视频精品免费观看| 亚洲精品国产精华液| 日韩精品专区在线影院重磅| 成人免费毛片高清视频| 亚洲成av人在线观看| 欧美精品一区二区三区在线播放| 成人激情校园春色| 亚洲中国最大av网站| 久久久午夜精品理论片中文字幕| 91同城在线观看| 久久99久国产精品黄毛片色诱| 亚洲欧美一区二区三区极速播放| 日韩一区二区中文字幕| 91免费观看在线| 卡一卡二国产精品| 一区二区三区蜜桃| 久久一区二区三区四区| 欧美在线999| 成人不卡免费av| 九一九一国产精品| 亚洲福利一二三区| 国产精品美女www爽爽爽| 欧美第一区第二区| 欧美另类变人与禽xxxxx| 成人免费视频app| 极品少妇一区二区| 日韩成人免费在线| 一区二区三区四区精品在线视频| 久久久99精品免费观看| 日韩一区二区三区高清免费看看| 色偷偷久久人人79超碰人人澡| 国产丶欧美丶日本不卡视频| 久草热8精品视频在线观看| 亚洲bt欧美bt精品| 亚洲小说欧美激情另类| 亚洲精品国产精品乱码不99 | 亚洲成人动漫在线免费观看| 中文字幕永久在线不卡| 国产视频亚洲色图| 精品日本一线二线三线不卡| 欧美日韩不卡在线| 欧美福利一区二区| 欧美一区午夜视频在线观看| 欧美在线观看一区二区| 欧美视频精品在线观看| 91国偷自产一区二区开放时间 | 日韩制服丝袜av| 亚洲一区二区三区视频在线播放| 国产精品伦理在线| 国产精品伦理一区二区| 国产精品久久久久久久久久久免费看 | 国产精品久久久久久亚洲伦| 亚洲国产精品av| 欧美激情在线看| 国产精品灌醉下药二区| 亚洲人快播电影网| 亚洲激情图片qvod| 亚洲综合一区二区精品导航| 亚洲国产精品久久久久秋霞影院| 亚洲国产日韩a在线播放性色| 香蕉av福利精品导航| 日本不卡一区二区三区高清视频| 麻豆精品久久精品色综合| 精品在线免费视频| 国产成人精品免费看| av影院午夜一区| 欧美色区777第一页| 日韩亚洲欧美高清| 国产欧美日韩在线看| 亚洲精品国产视频| 日本不卡在线视频| 成人av高清在线| 欧美中文字幕一区二区三区亚洲| 欧美精品在欧美一区二区少妇| 精品1区2区在线观看| 亚洲美女屁股眼交| 日产精品久久久久久久性色 | 国产日韩欧美精品综合| 亚洲精品乱码久久久久久黑人| 亚洲成av人片在线观看无码| 激情综合色综合久久| 粉嫩13p一区二区三区| 欧美色视频一区| 久久综合av免费| 亚洲黄色av一区| 精品一区二区成人精品| 91视视频在线观看入口直接观看www | 国产日韩视频一区二区三区| 亚洲女女做受ⅹxx高潮| 蜜臀国产一区二区三区在线播放| 波多野结衣亚洲一区| 日韩欧美国产三级电影视频| 亚洲三级电影全部在线观看高清| 美女精品自拍一二三四| 色哟哟亚洲精品| 国产午夜亚洲精品不卡|