PMC-Sierra PM5358 S/UNI 4x622 사용자 설명서
PM5358 S/UNI-4x622 Driver Manual
Appendix A: Coding Conventions
Proprietary and Confidential to PMC-Sierra, Inc.
122
Document ID: PMC-2010419, Issue 1
Type
Case
Naming convention
Examples
Functions
Notation
Porting
Functions
Functions
Hungarian
Notation
Notation
prefix with
“sys”
and device name
sysSuni4x622Read()
Other
Functions
Functions
Hungarian
Notation
Notation
utilSuni4x622Valid
ateChan()
ateChan()
Variables
Hungarian
Notation
Notation
maxDevs
Pointers to
variables
variables
Hungarian
Notation
Notation
prefix variable name with
“p”
pmaxDevs
Global
variables
variables
Hungarian
Notation
Notation
prefix with device name
suni4x622Mdb
Macros
•
Macro names must be all uppercase
•
Words shall be separated by an underscore
•
The letter
‘m’
in lowercase is used as a prefix to specify that it is a macro, then the device
abbreviation must appear
•
Example:
mSUNI4x622_GET_BIT
is a valid name for a macro
Constants
•
Constant names must be all uppercase
•
Words shall be separated by an underscore
•
The device abbreviation must appear as a prefix
•
Example:
SUNI4x622_MAX_POLL
is a valid name for a constant
Structures
•
Structure names must be all uppercase
•
Words shall be separated by an underscore
•
The letter
‘s’
in lowercase must be used as a prefix to specify that it is a structure, then the
device abbreviation must appear
•
Example:
sSUNI4x622_DDB
is a valid name for a structure