📄 spdefs.h
字号:
/* $Header$ */
/* THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY *
* INFORMATION. IF PUBLICATION OCCURS, THE FOLLOWING NOTICE APPLIES: *
* "COPYRIGHT 2000 MICHAEL TSIROULNIKOV, ALL RIGHTS RESERVED" *
FILE: stddefs.h
LANGUAGE: C-- (ready for ASM)
TITLE: shared declarations
STATUS: draft
REFERENCES: personal experience + TI DAIS
PURPOSE: DSP specific coding standard
NOTES:
prefix system:
s signed (16 bit)
u unsigned (16 bit)
l 32 bit
a array of
p ptr to
no prefix: composite type
prefices are stacked:
apulXXX means "array of pointers to unsigned long variables".
allowed exceptions:
names like "acc", "ac0", "t", etc, which are names of DSP registers;
local vars: S16 counters like "k", "n", etc.
module filenames start from 'name'.
namei.h declares objects visibile within the module.
all internal definitions start from name_.
name.h declares objects visibile externally.
all external definitions start from NAME_.
all functions definitions are in lower case, with underscores.
all variable are first-symbol capitalized, without underscore.
all defines are fully capitalized with underscores.
local variables do not contain either NAME_ or name_
static vars, functions, declarations preceeded by double underscore.
as a rule, one statement per line.
as a rule, no composite 'if's.
AUTHOR: Michael Tsiroulnikov
----------------------------------------------------------------------*/
#ifndef _spdefs_h
#define _spdefs_h
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
typedef unsigned short U16;
typedef short S16;
typedef unsigned long U32;
typedef long S32;
#ifndef NULL
#define NULL ((void *)0)
#endif
#define SP_FR_SZ (40) /* 5 ms */
#define STD_FR_SZ (SP_FR_SZ)
/* for simulation */
#if 0
typedef double Q15;
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -