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

📄 port.h

📁 56f8300E系列dsp的BOOTloader
💻 H
字号:
/*******************************************************************************
*
* Motorola Inc.
* (c) Copyright 2002 Motorola, Inc.
* ALL RIGHTS RESERVED.
*
* $Element: /project/dsp568_sdk/sdk/src/dsp56838evm/nos/include/port.h $ 
* $Author: saa $ 
* $Revision: /main/2 $ 
* $VOB: /project/dsp568_sdk $ 
* $OS: solaris $ 
*
* Description:  basic SDK types
*
* Notes:    
*
******************************************************************************/

/* File: port.h */

#ifndef __PORT_H
#define __PORT_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************
* Target designation
*******************************************************/

/* MetroWerks defines __m56800E__ */


/*******************************************************
* C Constructs
*******************************************************/

#define EXPORT extern
#define ITU_INTRINSICS


/*******************************************************
* Basic Types 
*******************************************************/

/* 8-bit integer types */
typedef unsigned char  UInt8;
typedef signed char    Int8;

/* Generic word types for ITU compatibility */
typedef short          Word16;
typedef unsigned short UWord16;
typedef long           Word32;
typedef unsigned long  UWord32;

/* 16-bit integer types */
typedef int            Int16;
typedef unsigned int   UInt16;
typedef long           Int32;
typedef unsigned long  UInt32;


/* device support basic types */
typedef unsigned int clockid_t;
typedef unsigned int timer_t;
typedef long             time_t;

#if __m56800E_lmm__ 
typedef  unsigned long    ssize_t;
#else
typedef  unsigned int     ssize_t;
#endif

typedef unsigned int* handle_t;
typedef void (*types_tCallback)(void *);
typedef void (*types_tErrorCallback)(UWord16);


/* timer support basic types */
union sigval
{
	int    sival_int;
	void * sival_ptr;
};

struct sigevent
{
	int          sigev_signo;
	union sigval sigev_value;
	int          sigev_notify;
	void         (*sigev_notify_function)(union sigval);
};

/* Fractional data types for portability */
typedef short          Frac16;
typedef long           Frac32;

typedef struct {
   Frac16     real;
   Frac16     imag;
} CFrac16;

typedef struct {
   Frac32     real;
   Frac32     imag;
} CFrac32;

/* Useful definitions */

/* Convert int/float to Frac16; constant x generates compile time constant */
#define FRAC16(x) ((Frac16)((x) < 1 ? ((x) >= -1 ? (x)*0x8000 : 0x8000) : 0x7FFF))
#define FRAC32(x) ((Frac32)((x) < 1 ? ((x) >= -1 ? (x)*0x80000000 : 0x80000000) : 0x7FFFFFFF))

/* Miscellaneous types */
typedef int            Flag;

typedef int            Result;

#ifndef COMPILER_HAS_BOOL
typedef int            bool;
#endif



/* SDK Offsets */




/*******************************************************
* Constants
*******************************************************/

/* Function Result Values */
#define PASS           0
#define FAIL           -1

#ifndef COMPILER_HAS_BOOL
#define true           1
#define false          0
#endif


/*******************************************************
* Implementation Limits 
*******************************************************/

#define PORT_MAX_VECTOR_LEN  65535


#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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