📄 gtmpscsio.h
字号:
/* sdma_dy4.h - Header File for UART implemented on GT-64x60 MPSC port *//************************************************************************** * * Copyright (c) 2005 Curtiss-Wright Controls, Inc. All rights * reserved. This Source Code is the Property of Curtiss-Wright * Controls, Inc. and can only be used in accordance with Source * Code License Agreement(s) of Curtiss-Wright Controls, Inc. or any * of its subsidiaries. * **************************************************************************//* modification history-------------------- 01g, 06dec05,tis add support for SCP-124 01f, 26sep05,asu add support for CCA-149 01e, 06may05,tis add support for CCA-146 01d, 23dec04,tis add support for Rx Idle timer 01c, 22nov04,tis add include boardName.h 01b, 01nov04,tis add support for CCA-145 01a, nov02,deb PTR release*/#ifndef __INCgtMpscSioh#define __INCgtMpscSioh /******************************** ******** INCLUDE FILES ******** *********************************/#include "h/drv/dy4/boardName.h"#ifdef VME_182#include "intCtrl182_dy4.h"#endif#ifdef CCA_145#include "intCtrl145.h"#endif#ifdef CCA_146#include "intCtrl146.h"#endif#ifdef CCA_149#include "intCtrl149.h"#endif#ifdef VME_183#include "intCtrl183.h"#endif#ifdef SCP_124#include "intCtrl124.h"#endif#include "sdma_dy4.h"#include "gtMpsc.h" /* #include "h/drv/discovery_II/sio/mpsc.h" *//* #include "h/drv/discovery_II/gtCore.h" */ #include "errnoLib.h"#include "errno.h"#include "sioLib.h" /******************************** ******** LOCAL DEFINES ******** *********************************/#define GT_MPSC_CHANNEL_0 0 /* communication ports 0 */#define GT_MPSC_CHANNEL_1 1 /* communication ports 1 */ #define NUM_MPSC_PORTS 2 /******************************** ******** LOCAL STRUCTS ******** *********************************/struct _GT_MPSC_CHAN;typedef struct mpsc_sio_chan { /* must be first */ SIO_CHAN sio; /* standard SIO_CHAN element */ /* callbacks */ STATUS (*getTxChar) (); /* installed Tx callback routine */ STATUS (*putRcvChar) (); /* installed Rx callback routine */ void *getTxArg; /* argument to Tx callback routine */ void *putRcvArg; /* argument to Rx callback routine */ UINT32 channelMode; /* such as INT, POLL modes */ UINT32 regDelta; /* register address spacing */ UINT32 channel; /* channel number (0 or 1) */ UINT32 protocol; /* UART_PROTOCOL or HDLC_PROTOCOL supported */ UINT32 rxClk; /* Internal BRG0,1,or external SCLK0,1 clock source */ UINT32 txClk; /* Internal BRG0,1,or external SCLK0,1 clock source */ UINT32 clkSrc; /* TClk is standard BClkIn,SClkx,TSClkx */ UINT32 clkFreq; /* Hz, Freq of clkSrc, only for TClk or BClk */ UINT32 baudRate; /* the current baud rate */ UINT32 txSens; /* Transmit Sense - Delay after RXD finishes */ /* SDMA Buffer descriptions */ PORT_ALLOCATION_STRUCT rxAllocStruct; PORT_ALLOCATION_STRUCT txAllocStruct; /* Pointer to Device Channel Structure */ struct _GT_MPSC_CHAN * pGtMpscChan; /* Interrupt Handling */ void (*intRxHandler)( SIO_CHAN * channel); int intRxPriority; void (*intTxHandler)( SIO_CHAN * channel); int intTxPriority; INT_CAUSE intTxCause; /* MPSC0_CAUSE or MPSC1_CAUSE */ /* Protocol Specific Interrupt Handling */ void (*intProtRxHandler)( SIO_CHAN * channel); void (*intProtTxHandler)( SIO_CHAN * channel); /*status */ UINT32 intTxCount; UINT32 intTxSend; UINT32 intTxSendChar; UINT32 intTxSendCharErr; UINT32 intTxStartup; UINT32 intSdmaCount; UINT32 intRxCount; UINT32 intRxRcv; UINT32 intRxRcvErr;#if defined(CCA_145)|| defined(CCA_146) || defined(CCA_149) || defined(VME_182) || defined(VME_183) || defined(SCP_124) UINT32 intRxIdleTimerPeriod; UINT32 intRxIdleTimer; UINT32 intRxIdleTimerInt; STATUS intRxIdleTimerEnable;#endif } MPSC_SIO_CHAN; /******************************** ** LOCAL VARIABLE DECLARATION *** *********************************/ /******************************** ** LOCAL FUNCTION PROTOTYPES ** *********************************/void gtMpscAbortAll(UINT32 MPSCPort);void gtMpscDevInit(MPSC_SIO_CHAN* pMpscChan);STATUS gtMpscIoctl (SIO_CHAN *pSioChan, int request, int arg);void gtMpscRxHandler(void);void gtMpscTxHandler(MPSC_SIO_CHAN* pChan);void gtMpscDevMemAlloc (MPSC_SIO_CHAN* pMpscChan);STATUS gtMpscAllocBuffersForTxDescriptors(UINT32 mpscPort,UINT32 numTxDescBuf, UINT32 sizeTxDescBuf);STATUS gtMpscBaudSet(MPSC_SIO_CHAN * pChan,UINT32 baudRate);void gtMpscIntEnable(void);void gtMpscIntDisable(void);#endif /* __INCgtMpscSioh */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -