⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proto.h

📁 实现vxworks下的1553b通讯功能
💻 H
字号:
#ifndef __PROTO_H
#define __PROTO_H

#include <stdlib.h>
#define borland_dll
typedef int BOOL;
#include <taskLib.h>
#define Sleep(s)	taskDelay(s) 

typedef unsigned short int usint;
#include "error_mch.h"
#include "error_devio.h"
#include "summit.h"

/* function prototypes */

#ifdef __cplusplus
extern "C"
{
#endif

/* INITCARD.C */
int borland_dll Init_Card_MCH(usint, usint) ;
int borland_dll Release_Card_MCH (void);
void delay_msec(long int msecs);
int Set_Bank(int);
int borland_dll Select_Channel (unsigned short);
int Reset_Channel (unsigned short);
int borland_dll Set_Interrupt_Level (int);
int Reset_Interrupt (unsigned char interrupt_channels);
int Get_Interrupt_Channels (unsigned char *intchan);
int SetupInterruptHandler(VOIDFUNCPTR funcname);
int ClearInterruptHandler(void);
void InterruptHandler_MCH(void);
int Exc_SetupInterruptHandler_MCH(unsigned short int channel, VOIDFUNCPTR funcname);
int Exc_ClearInterruptHandler_MCH(unsigned short int channel);

/* GSET.C */
int borland_dll Set_PingPong (short);
int borland_dll Set_Broadcast (short);
int borland_dll Get_Broadcast (void);
int borland_dll Get_BIT (void);
int borland_dll Get_Pending (void);
int borland_dll Set_Mode (short);
int borland_dll Stop_Card (void);
int borland_dll Set_Protocol (short mode);
int borland_dll Report_Channel(void);
int borland_dll Get_Channel_Status (unsigned short);
int borland_dll Get_Curr_Command(void); /* obsolete; use Get_Curr_Command_Word */
int borland_dll Get_Op_Status(void);
borland_dll usint* Get_Memory_Pointer(unsigned int offset); /* internal function needed for ShowHex in Merlin */
borland_dll usint* Get_Register_Pointer(unsigned int offset); /* internal function needed for ShowHex in Merlin */
int borland_dll Get_Curr_Command_Word(void);

/* internal functions not recommended for users */
borland_dll usint* Get_Memory_Pointer(unsigned int offset); 
borland_dll usint* Get_Register_Pointer(unsigned int offset); 
int borland_dll Peek_Memory(unsigned int offset, usint *value);
int borland_dll Poke_Memory(unsigned int offset, usint value);
int borland_dll Peek_Register(usint offset, usint *value);
int borland_dll Poke_Register(usint offset, usint value);
/* BMSET.C */
int borland_dll Run_BM (void);
int borland_dll Get_Last_Cmd (void); /* obsolete. Use Get_Curr_Command_Word */
int borland_dll Monitor_All_RT (void);
int borland_dll Monitor_RT (short rtid);
int borland_dll Clear_Monitor_RT (short rtid);
int borland_dll Read_Next_Message (struct BM_MSG *msg);

/* RTSET.C */
int borland_dll Set_RT_Num (short rtid);
int borland_dll Load_Datablk (usint subaddress, usint modecode, usint *data);
int borland_dll Read_Datablk (usint subaddress, usint modecode, usint *data, short msgtype, short txorrx);
int borland_dll Set_RT_Status (short status);
int borland_dll Set_Status_Clear (short flag);
int borland_dll Run_RT (void);
int borland_dll Set_Interrupt_Mask (usint intr);
int borland_dll Set_Legal_Command (usint subaddress, short brdcst, short txorrx, short ismode, short legal);
int borland_dll Enable_Subaddr_Int (usint subaddr, short txorrx, short msgtype, short inttype);
int borland_dll Disable_Subaddr_Int (usint subaddr, short txorrx, short msgtype, short inttype);
int borland_dll Datablk_Accessed(unsigned short subaddr, short txorrx, short msgtype, short inttype);
int borland_dll Load_Buffer (usint buffernum, usint *data);
int borland_dll Assign_Buffer(usint subaddr, usint buffernum);
int borland_dll Setup_Multibuffer(unsigned short subaddr, short numbufs, short startaddr);
int borland_dll Load_Multibuffer_Data(unsigned short numwords, short address, short *data);
int borland_dll Enable_Multibuffer(void);
int borland_dll Disable_Multibuffer(void);

/* ERROR.C */
borland_dll char * Print_Error (int errorcode);
int borland_dll Get_Error_String_MCH(int errcode, int errlen, char *errstring);

/* BCSET.C */
int borland_dll Set_BC_Cmd (usint cmdnum, struct CMDENTRY *entry);
int borland_dll Get_BC_Cmd (usint cmdnum, struct CMDENTRY *entry);
int borland_dll Load_BC_Datablk (usint blknum, usint wdcnt, usint *data);
int borland_dll Read_BC_Datablk (usint blknum, usint wdcnt, usint *data);
int borland_dll Run_BC (void);
int borland_dll Last_BC_Cmd (void);
int borland_dll Command_Word_MCH(int rtnum, int type, int subaddr, int numwords, usint *commandword);
int borland_dll Control_Word_MCH(usint opcode, usint retrynum, usint bus, usint rt2rt_flag, usint ccodes, usint *controlword);


#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -