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

📄 nu_std.h

📁 电力系统中的保护装置全部代码
💻 H
字号:
/****************************************************************
        Standard Input/Output header.

        NOTE: The library has no real notion of input/output.
        The type FILE and the defines stdout and stderr may
        be redefined as appropriate for the user supplied
        fputc function.
****************************************************************/
#ifndef __STDIO_NU
#define __STDIO_NU

#include        "stdio.h"
#ifdef PLUS
#include        "nucleus.h"
#else
#include        "nu_defs.h"
#include        "nu_extr.h"
#endif


extern NU_MEMORY_POOL System_Memory;

/*  Flags to indicate if these device drivers (optionally provided by ATI) 
    are present.  If you have the specified driver, you should change
    #undef to #define */

/*  Flags to indicate what type of device is present. */ 
#define NU_FILE         0
#define NU_SERIAL       1
#define NU_NETWORK      2
#define NU_PARALLEL     3

#ifdef NUCLEUS_SIO
/* prototypes for sio functions */
FILE *sio_open(FILE *);
void sio_close(FILE *);
int sio_putc(int, FILE *);
int sio_getc(FILE *);
int sio_flush(FILE *);
#endif

#ifdef NUCLEUS_FILE
/* File access flags used in NUCLEUS FILE service calls */
#define PO_RDONLY 	0x0000 	 /* Open for read only */
#define PO_WRONLY 	0x0001   /* Open for write only */
#define PO_RDWR   	0x0002   /* Read/write access allowed. */
#define PO_NOSHAREANY   0x0004   /* Wants this open to fail if already */
#define PO_APPEND 	0x0008   /* Seek to eof on each write */

#define NU_IMPUT 	0x0040   /* the sign of the first block for NU_Read() */
#define NU_EMPTY 	0x0080   /* the sign of the first block for NU_Read() */

#define PO_CREAT  	0x0100   /* Create the file if it does not exist. */
#define PO_TRUNC  	0x0200   /* Truncate the file if it already exists */
#define PO_EXCL   	0x0400   /* Fail if creating and already exists */
#define PO_NOSHAREWRITE 0x0800   /* Wants this opens to fail if already */
#define PO_TEXT   	0x4000   /* Ignored */
#define PO_BINARY 	0x8000   /* Ignored. All file access is binary */

#define PS_IWRITE 0000400       /* Write permitted      */
#define PS_IREAD  0000200       /* Read permitted. (Always true anyway)*/

/* prototypes for NUCLEUS FILE specific routines */
FILE *file_open(char *, char *, FILE *);
void file_close(FILE *);
int file_putc(int, FILE *);
int file_getc(FILE *);
int file_flush(FILE *);

unsigned convert_mode(char *);
char *make_socket_name(int);

extern int NU_Open(char *, unsigned short int, unsigned short int);
extern unsigned short int NU_Read(int,  unsigned char *, unsigned short int);
extern unsigned short int NU_Write(int, unsigned char *, unsigned short int);
extern int NU_Close(int);
#endif

#endif

⌨️ 快捷键说明

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