📄 bsp.h
字号:
/* bsp.h - VME-183 board series general bsp header file. *//************************************************************************** * * Copyright (c) 2004-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 of * CURTISS-WRIGHT CONTROLS EMBEDDED COMPUTING, "CWCEC". * **************************************************************************//*modification history--------------------01d,15Dec05, gd CR2748 Removed sysUniverseIntr and added new vme related functions.01d,12dec05, tis -rename Discovery_II directory to Discovery_III CR#12858. -added new functions introduced in Rel 1.201c,03Apr05, rcd CR#3222 sysToggleLed prototype backwards compatible.01b,30mar05, aak CR#2701 fix compile errors and clean up 01a,29oct04, cwc create from the copy for SVME-182 rev. 01g.*//*DESCRIPTION:Contains the function prototypes for user API's of the cwv183 VxWorks BSP.Note: This file currently contains most of the required API's but is still considered work in progress.*/#ifndef __INCbsph#define __INCbsph #ifdef __cplusplusextern "C" {#endif /* __cplusplus */#include "h/drv/dy4/boardName.h" /* must be first */#include "dosFsLib.h"#include "iosLib.h"#include "sioLib.h"#include "h/drv/rtc/ds1501.h"#include "h/drv/discovery_III/dma/gtDma_dy4.h"#include "h/drv/discovery_III/dma/gtDmaIntCntrl_dy4.h"#include "h/drv/discovery_III/timer/gtTimer_dy4.h"#include "h/drv/mms/dy4mmsMP.h"#include "h/drv/dy4/dy4std.h"#include "h/drv/dy4/pciExt.h"#include "h/drv/dio/dio_dy4.h"#include "h/drv/discovery_III/gtCore_dy4.h"#include "h/drv/discovery_III/i2c/gtI2c.h"#include "h/drv/thermal/dy4max6634.h"#include "h/drv/discovery_III/mem/memUtil.h"#include "cwv183.h"#include "h/drv/timer/fpgaTimer.h"#include "h/drv/timer/wDogAv.h"/* VME DMA *****************************************************//* async_sysVmeDmaCopy - copy blocks across the VMEbus using the DMA. Location: {$BSP_DIR}/src/drv/vme/universeDmaVme_dy4.c*/IMPORT STATUS async_sysVmeDmaCopy ( char *local_addr, char *vme_addr, UINT32 xfer_size, BOOL to_vme );/* async_sysVmeDmaExampleISR - default VMEbus DMA interrupt function for async. Location: {$BSP_DIR}/src/drv/vme/universeDmaVme_dy4.c*/IMPORT void async_sysVmeDmaExampleISR(void);/* DIFF DIO *************************************************//* difDioIntConnect - specifies the interrupt service routine to be attached to a given differential input source. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioIntConnect ( UINT32 difMask, FUNCPTR difRoutine, int arg );/* difDioIntEdgeSet - sets the edge that will trigger an interrupt for each differential input line whose bit is set in the mask. The difEdge flag can be either RISING or FALLING. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioIntEdgeSet ( UINT8 difMask, BOOL difEdge );/* difDioInit - initializes the differential I/O facility. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioInit ( UINT8 difSelect );/* difDioIntDisable - disables the given differential I/O interrupt by manipulating the corresponding bits (difMask) in the mask register. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioIntDisable ( UINT8 difMask );/* difDioIntEnable - enables the given differential I/O interrupt by setting the corresponding bits (difMask) in the mask register. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioIntEnable ( UINT8 difMask );/* difDioRead - reads the differential input lines and stores the data at the location pointed to by pValue. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioRead ( UINT8 *pValue );/* difDioWrite - sets the data for the specified differential output lines to the specified value. Location: {$BSP_DIR}/src/drv/dio/diffDioFpga.c*/IMPORT STATUS difDioWrite ( UINT8 value );/* DIO ****************************************************************//* dioDirectionSet - Sets direction of DIO ports (IN/OUT) Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioDirectionSet( UINT32 dioMask, int dioDirection);/* dioConnect - connect a routine to the DIO interrupt. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioConnect ( UINT32 dioMask, FUNCPTR, int arg );/* dioShow - Displays DIO Ports Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT void dioShow ( void );/* dioEdgeSet - sets the interrupt triggering edge of specified DIO lines. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioEdgeSet ( UINT32 dioMask, int dioEdge );/* dioInit - initialize the DIO device. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioInit ( void );/* dioIntDisable - disable DIO local interrupts. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioIntDisable ( UINT32 dioMask );/* dioIntEnable - enable DIO local interrupts. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioIntEnable ( UINT32 dioMask );/* dioRead - Read the DIO Data and store at location pointed to by parameter. Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioRead ( UINT32 *pValue );/* dioWrite - Write the DIO Data Location: {$BSP_DIR}/src/drv/dio/dio_dy4.c*/IMPORT STATUS dioWrite ( UINT32 dioMask, UINT32 value );/* Discovery_III: I2c ****************************************************//* dy4I2cClearAckBit - Clears the acknowledge bit Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cClearAckBit(void);/* dy4I2cClearIntFlag - Clears the interrupt flag in the control register Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cClearIntFlag(void);/* dy4I2cDelay - Cause a delay Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cDelay ( unsigned int time );/* dy4I2cIntEnable - Enable interrupt generation Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cIntEnable(void);/* dy4I2cIntDisable - Disable interrupt generation Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cIntDisable(void);/* dy4I2cMasterRead - Read data from a device Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cMasterRead ( I2C_DEV_TYPE devType, unsigned int addr, unsigned int offset, unsigned char *data, unsigned int size );/* dy4I2cMasterInit - Initializes the I2C mechanism integrated in the GT Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cMasterInit(void);/* dy4I2cMasterSendDeviceAddr - Transmit a device address to an I2C device Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cMasterSendDeviceAddr ( I2C_DEV_TYPE devType, unsigned int addr, unsigned int flag);/* dy4I2cMasterSendOffset - Transmit the device address and offset address Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cMasterSendOffset ( I2C_DEV_TYPE devType, unsigned int addr, unsigned offset );/* dy4I2cMasterSendWrite - Write data to a device Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cMasterWrite ( I2C_DEV_TYPE devType, unsigned int addr, unsigned int offset, unsigned char *data, unsigned int size ); /* dy4I2cReadIntFlag - Read I2C's interrupt flag status Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT unsigned int dy4I2cReadIntFlag(void);/* dy4I2cReadStatus - Read I2C's status register Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT unsigned int dy4I2cReadStatus(void);/* dy4I2cReset - Reset the I2C's logic and set its registers values to their* defaults Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cReset(void);/* dy4I2cSetAckBit - Set acknowledge bit Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cSetAckBit(void);/* dy4I2cSetStartBit - Generate start bit to being a transaction Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cSetStartBit ( I2C_START_TYPE startType );/* dy4I2cSetStopBit - Generate stop bit to end a transaction Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT void dy4I2cSetStopBit(void);/* dy4I2cStatusCheck - Check status bit Location: {$BSP_DIR}/src/drv/discovery_III/i2c/gtI2c.c*/IMPORT I2C_STATUS dy4I2cStatusCheck ( I2C_CHECK_TYPE checkType );/* MMS **********************************************************************//* dy4mmsCalloc - Malloc cleared memory from the shared memory region Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT STATUS dy4mmsCalloc ( void **ptr, unsigned int nitmes, unsigned int nbytes);/* dy4mmsClearStats - Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT void dy4mmsClearStats(void);/* dy4mmsMemalign - Malloc aligned memory from the shared memory region. Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT STATUS dy4mmsMemalign ( void **ptr, unsigned int size, unsigned int align );/* dy4mmsMemFree - free allocated memory from the shared memory region. Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT STATUS dy4mmsFree ( void *ptr );/* dy4mmsMalloc - Malloc memory from the shared memory region Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT STATUS dy4mmsMalloc ( void **ptr, unsigned int size );/* dy4mmsMemCheck - Check the heap and get the heap statistics Location: {$BSP_DIR}/src/drv/mms/dy4mmsMP.c*/IMPORT long dy4mmsMemCheck ( unsigned long *nRegions_p, unsigned long *freeBytes_p, unsigned long *largest_p );/* dy4mmsMsgRecv - Receive a message from the other CPU Location:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -