TI 数据类型的定义

/*% F$ O: S6 E* z7 E
*  Copyright 2006 by Texas Instruments Incorporated.
! _5 v& Z' c; r: O: J *  All rights reserved. Property of Texas Instruments Incorporated.
6 _$ ?" r$ n( a# n0 m2 ]+ J *  Restricted rights to use, duplicate or disclose this code are
7 f, U; O( J' b' E *  granted through contract.
3 H' v8 K1 z' e1 ?* g7 j) u1 yDSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 *
# u3 q9 i* P1 D+ s, j4 ~ *  @(#) DSP/BIOS_Kernel 5,2,3,14 10-05-2006 (cuda-r14)DSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 - h7 ]- V' A4 A$ o4 }$ a
*/6 D. K0 T) {9 a+ A7 F% w; b
/*  O$ r# d# V/ V* v' D  a
*  ======== tistdtypes.h ========
# i2 y% c& y* g& w) H9 l2 _6 y *4 ~3 x  e3 V8 a
*/" A& x! d  L$ i, ]/ i6 g, _# m
www.hellodsp.com1 h) // O. /& w  D# j

# b, O% V5 W. h3 z5 G/*DSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 " ?# h. v( H" U: b8 C* n! F
*  These types are also defined by other TI components.  They are bracketed
4 f1 P6 [) /. A) D% Uwww.hellodsp.com *  with _TI_STD_TYPES to avoid warnings for duplicate definition.  The
- ~# ]$ [4 ~# q+ Q& ~/ a3 wwww.hellodsp.com *  The Uint16, etc. definitions were provided in early 2.x versions of CSL
) o) x: M5 S9 y2 S, ~2 P *  that did not have _TI_STD_TYPES protection.
3 F/ m8 c, y/ |6 U: SDSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 *
5 K  @  y8 _1 e7 Y% I9 q  ]% swww.hellodsp.com *  You may get warnings about duplicate type definitions when using this
$ z, o9 I8 c& _: q: b *  header file with 2.x CSL.  You can use the '-pds303' compiler option to
* h& ~! P7 i; J *  suppress these warnings." X) [9 x/ ?$ J7 o: p3 u: U# W- X
*/1 c0 L8 f# t. B1 }: E" P
#ifndef _TI_STD_TYPES
3 F# L4 v* V  A  q#define _TI_STD_TYPES+ e9 z- d$ Q/ t( g& ^

* V9 c2 _7 p; Y+ /www.hellodsp.com/*& P. ^/ Q+ B. _0 R% ^+ N
* Aliases for standard C typeswww.hellodsp.com, C% s; h7 H# f8 X, u
*/www.hellodsp.com+ Y: U" Q# A, Z' r: x$ ?
typedef int                     Int;: /  @. r' E  E& s
typedef unsigned                Uns;
6 E7 h* [6 R' L" X; Z. n( Jtypedef char                    Char;1 I1 W" U4 d- i) b

8 u0 y, R( E$ Q% v- d( e/* pointer to null-terminated character sequence */
! C6 v( d. Q, U2 a# F0 U% Mwww.hellodsp.comtypedef char                    *String;
, G$ U) H0 T: @# h' _DSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台
6 P) _2 V0 K: ftypedef void                    *Ptr;           /* pointer to arbitrary type */
/ X6 ^5 p' Z1 c, n! h, S
) a9 c; b0 m+ xtypedef unsigned short          Bool;           /* boolean */
0 C6 E  j2 [; q( @www.hellodsp.com
+ V  W/ e& i, T) Q9 }  @1 J4 t/*
# Q; N) ^8 B3 f+ o5 M. U2 g+ / * Uint8, Uint16, Uint32, etc are defined to be "smallest unit of
3 t/ f. c, ]/ p4 v * available storage that is large enough to hold unsigned or integer- V6 }6 M, {: L1 p* R7 /
* of specified size".) r! k& T: r5 J; m
*/2 e7 F+ L+ l6 S' G" I3 Y  @
  L. Y& Q6 V  @( b$ _1 L
/* Handle the 6x ISA */
$ X9 k0 p0 x% n& V0 h7 uDSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 #if defined(_TMS320C6X)
4 |3 E# F: y1 g3 L2 O6 iwww.hellodsp.com    /* Unsigned integer definitions (32bit, 16bit, 8bit) follow... */1 F# `- S$ `/ m( J- d. @8 /3 x/ P
    typedef unsigned int        Uint32;
, ~/ V# s/ @$ h- W6 Z/ /* t; f! `    typedef unsigned short      Uint16;
& G- m7 Q/ y! G8 Q1 e6 M" f6 C    typedef unsigned char       Uint8;DSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 ( r0 ~. x6 [" d- c

  J4 N) /- e$ d( V    /* Signed integer definitions (32bit, 16bit, 8bit) follow... */$ H3 g! C2 /2 ?' Q/ s- o  ^
    typedef int                 Int32;www.hellodsp.com# G7 C- ^* p% N% q" e- |
    typedef short               Int16;
4 w1 h$ L4 Q" |- h; P8 p    typedef char                Int8;+ f' l* K6 P0 n4 d
; c1 o! @7 T# o7 a) {" ?" L
/* Handle the 54x, 55x and 28x ISAs */5 j, ?9 v  d  z. L/ E
#elif defined(_TMS320C5XX) || defined(__TMS320C55X__)! o) v7 E1 k4 U: /, ^6 t& V0 d% W
    /* Unsigned integer definitions (32bit, 16bit, 8bit) follow... */' u" M0 m0 /8 b7 V7 p
    typedef unsigned long       Uint32;www.hellodsp.com; T2 `+ M: S& D# G
    typedef unsigned short      Uint16;
9 T, z5 t$ T/ Q    typedef unsigned char       Uint8;6 Y+ |) f' t9 K! S) u* Q3 d# U0 B

4 ]# S5 u0 G1 T% e7 A    /* Signed integer definitions (32bit, 16bit, 8bit) follow... */
3 /; K! f! {3 T4 G  f1 u    typedef long                Int32;* e( M% c$ ]. i! I/ S! E! }
    typedef short               Int16;
- Y) y7 O) E6 f( X! [! A    typedef char                Int8;
! g! P1 e$ B8 ewww.hellodsp.com5 ]! @5 K" c+ s% f" k
#elif defined(_TMS320C28X)
) v3 H. ^9 Y! O3 M+ [: n  }8 p+ z9 bDSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台     /* Unsigned integer definitions (32bit, 16bit, 8bit) follow... */
3 }; F: N7 m) S    typedef unsigned long       Uint32;
$ u% n7 N! z, _. q2 H/ T    typedef unsigned int        Uint16;: q# Q$ D% T2 p6 ]3 o* /# ~
    typedef unsigned char       Uint8;+ k& `2 F- t& t6 U

* o: R8 T; ~% G6 t  S    /* Signed integer definitions (32bit, 16bit, 8bit) follow... */
* z% ~( s( {6 h  Z0 G$ e, ?( [    typedef long                Int32;
/ L6 |0 d4 b* g8 `+ j* @$ q    typedef int                 Int16;- D5 }7 j6 _$ r& f3 w
    typedef char                Int8;0 ]; |5 T0 _* G
#else
6 S! G6 x$ o; Q) r1 `; @    /* Other ISAs not supported */7 t) F! S% i  ]6 U* q7 K
    #error <tistdtypes.h> is not supported for this target
* U2 [- f$ n/ p" B6 r: ]& JDSP交流网  DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 #endif  /* defined(_6x_) */
% d( B' ?( N( m; [5 E* _" O
' f8 x) {: @3 f/ P" p* D" c3 Mwww.hellodsp.com#endif  /* _TI_STD_TYPES */

附带:
DSP/BIOS中的匈牙利记法为: & S% @! Q; k7 _
  Sm开头的表示8-bit类型;
) c. y4 L/ H! X  g  Md开头的表示16-bit类型;
/ h; s* U* e" J1 i  Lg开头的表示32-bit类型;
6 l+ V( g/ ~  ?$ E  Int表示有符号整型; - A/ ~: _( r9 x1 z7 F8 [: v
  Uns表示无符号类型;
3 l+ v! S7 J1 B9 b  Bits表示按bit计算类型; 1 O8
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值