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

📄 diti.h

📁 用于TM1300/PNX1300系列DSP(主要用于视频处理)的操作系统pSOS。包括全部源码
💻 H
📖 第 1 页 / 共 3 页
字号:
/***********************************************************************//*                                                                     *//*   MODULE:  diti.h   1.4                                                *//*   DATE:    16:03:54 - 99/02/11                                                *//*   PURPOSE: Device Independent Console Interface macros and defines  *//*                                                                     *//*---------------------------------------------------------------------*//*                                                                     *//*           Copyright 1994, Integrated Systems, Inc.                  *//*                      ALL RIGHTS RESERVED                            *//*                                                                     *//*   Permission is hereby granted to licensees of Integrated Systems,  *//*   Inc. products to use or abstract this computer program for the    *//*   sole purpose of implementing a product based on Integrated        *//*   Systems, Inc. products.   No other rights to reproduce, use,      *//*   or disseminate this computer program, whether in part or in       *//*   whole, are granted.                                               *//*                                                                     *//*   Integrated Systems, Inc. makes no representation or warranties    *//*   with respect to the performance of this computer program, and     *//*   specifically disclaims any responsibility for any damages,        *//*   special or consequential, connected with the use of this program. *//*                                                                     *//*---------------------------------------------------------------------*//*                                                                     *//*                                                                     *//*                                                                     *//***********************************************************************//*---------------------------------------------------------------------*//* The Device Independent Terminal Interface Specification (DITI)      *//* describes the interface between a task and the Console Driver       *//* through the I/O switch table.The Console Driver will use the Device *//* Independent Serial Interface (DISI) to complete the device          *//* dependent part of the driver.                                       *//*---------------------------------------------------------------------*/#ifndef _DITI_H#define _DITI_H 1/*---------------------------------------------------------------------*//* Must include disi.h before this file                                *//*---------------------------------------------------------------------*/#ifndef _DISI_H    #include "disi.h"#endif/*---------------------------------------------------------------------*//* Macro to retrieve desired number from major.minor - minor device 0  *//* is an alias for the "System Console" (standard in/out/error) and    *//* this macro maps it to the actual device number.  The variable       *//* SysConsole contains the minor device number to map to.              *//*---------------------------------------------------------------------*/#define MINOR(dev_n)((dev_n & 0xFFFF) ? dev_n & 0xFFFF : SysConsole)/*---------------------------------------------------------------------*//* Terminal Interface Error Codes                                      *//*---------------------------------------------------------------------*/#define TERM_HDWR     0x10010200     /* Hardware error */#define TERM_MINOR    0x10010201     /* Invalid minor device */#define TERM_BAUD     0x10010203     /* Invalid baud rate */#define TERM_NINIT    0x10010204     /* driver not initialized */#define TERM_DATA     0x10010205     /* Cannot allocate data area */#define TERM_SEM      0x10010206     /* Semaphore error */#define TERM_AINIT    0x10010210     /* Console already initialized */#define TERM_CHARSIZE 0x10010211     /* bad character size */#define TERM_BADFLAG  0x10010212     /* flag not defined */#define TERM_NHWFC    0x10010213     /* Hardware flow not supported */#define TERM_BRKINT   0x10010214     /* Terminated by a break character */#define TERM_DCDINT   0x10010215     /* Terminated by loss of DCD */#define TERM_NBUFF    0x10010216     /* No buffers to copy characters */                                     /* (allocb failed) */#define TERM_NOPEN    0x10010217     /* minor device not opened */#define TERM_AOPEN    0x10010218     /* channel already opened */#define TERM_ADOPEN   0x10010219     /* channel already opened by */                                     /* another driver */#define TERM_CFGHSUP  0x10010220     /* hardware does not support */                                     /* channel as configured */#define TERM_OUTSYNC  0x10010221     /* out of sync with DISI */#define TERM_BADMIN   0x10010222     /* MinChar > RBuffSize */#define TERM_LDERR    0x10010223     /* Lower driver error may be */                                     /* corrupted structure */#define TERM_QUE      0x10010224     /* que error */#define TERM_RXERR    0x10010225     /* data receive error */#define TERM_TIMEOUT  0x10010226     /* Timmer expired for read or */                                     /* write */#define TERM_CANON    0x10010227     /* CANNON and MinChar and/or */                                     /* MaxTime set (can only have */                                     /* CANON or have MinChar and/or */                                     /* MaxTime */#define TERM_ROPER    0x10010228     /* redirect operation error */#define TERM_MARK     0x10010229     /* received a SIOCMARK */#define TERM_FRAMING  0x10010230     /* framing error */#define TERM_PARITY   0x10010231     /* parity error */#define TERM_OVERRUN  0x10010232     /* overrun error */#define TERM_NMBLK    0x10010233     /* no buffer headers */                                     /* (esballoc failed) */#define TERM_TXQFULL  0x10010234     /* transmit que is full (only if */                                     /* WNWAIT set) */#define TERM_WNWCONF  0x10010235     /* MaxWTime and WNWAIT both set */ #define TERM_BADCONSL 0x10010236     /* Bad default console number */ #define TERM_WABORT   0x10010237     /* Write was aborted *//*---------------------------------------------------------------------*//* TermInit will initialize the Terminal driver and the lower level    *//* DISI.                                                               *//* NOTE: TermInit will be called during system initialization. It      *//* MUST NOT be included in the I/O switch table.                       *//*---------------------------------------------------------------------*/void TermInit (struct ioparms *parms);/*---------------------------------------------------------------------*//* TermOpen will open a specific serial channel for use. The channel   *//* number that is to be opened will be the minor device number.        *//*---------------------------------------------------------------------*/void TermOpen(struct ioparms *parms);/*---------------------------------------------------------------------*//* TermOpen will do a range check on the channel number and create the *//* necessary semaphores needed to block on reads and writes.           *//*                                                                     *//* TermOpen will return in parms->err zero on success or one of the    *//* following error codes:                                              *//*                                                                     *//* TERM_NINIT    driver not initialized                                *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* TermRead will read from the minor device.                           *//*---------------------------------------------------------------------*/void TermRead (struct ioparms *parms);/*---------------------------------------------------------------------*//* The in_iopb element of the ioparms structure will point to a TermIO *//* structure:                                                          *//*---------------------------------------------------------------------*/typedef struct {    unsigned long length;            /* length of read/write */    unsigned char *buffp;            /* pointer to data buffer */}TermIO;/*---------------------------------------------------------------------*//* TermRead will fill the buffer pointed to by buffp according to the  *//* configuration set up by the call to TermOpen or configuration       *//* changed by TermIoctl. The read will return up to the length         *//* requested.                                                          *//*                                                                     *//* TermRead will return in parms->err zero on success or one of the    *//* following error codes:                                              *//*                                                                     *//* TERM_NOPEN     minor device has not been opened                     *//* TERM_NINIT     driver not initialized                               *//* TERM_MINOR     Invalid minor device                                 *//* TERM_BRKINT    Terminated by a break character                      *//* TERM_DCDINT    Terminated by loss of DCD                            *//* TERM_RXERR     data receive error                                   *//* TERM_TIMEOUT   Timmer expired for read or write                     *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* The number of characters read is returned in parms->out_retval.     *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* TermWrite will write to the minor device.                           *//*---------------------------------------------------------------------*/void TermWrite (struct ioparms *parms);/*---------------------------------------------------------------------*//* The in_iopb element of the ioparms structure will point to a TermIO *//* structure as described in the TermRead call. TermWrite will write   *//* characters pointed to by buffp according to the configuration set   *//* up by the call to TermOpen or configuration changed by TermIoctl.   *//* The write will be of the length requested.                          *//*                                                                     *//* If WNWAIT flag is set the characters pointed to by buffp will be    *//* copied to a new buffer before the call returns. There will be no    *//* confirmation of the success of the write.                           *//*                                                                     *//* TermWrite will return in parms->err zero on success or one of the   *//* following error codes:                                              *//*                                                                     *//* TERM_NOPEN  minor device has not been opened                        *//* TERM_NINIT     driver not initialized                               *//* TERM_MINOR     Invalid minor device                                 *//* TERM_NMBLK     no buffer headers  (esballoc failed)                 *//* TERM_DCDINT    Terminated by loss of DCD                            *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* The number of characters written is returned in parms->out_retval.  */

⌨️ 快捷键说明

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