PMC-Sierra PM5358 S/UNI 4x622 Power Screwdriver User Manual


 
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
Hungarian
Notation
prefix with
“sys” and device name
sysSuni4x622Read()
Other
Functions
Hungarian
Notation
utilSuni4x622Valid
ateChan()
Variables Hungarian
Notation
maxDevs
Pointers to
variables
Hungarian
Notation
prefix variable name with
“p”
pmaxDevs
Global
variables
Hungarian
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