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. 121
Document ID: PMC-2010419, Issue 1
APPENDIX A: CODING CONVENTIONS
This section describes the coding conventions used in the implementation of all PMC-Sierra
driver software.
Variable Type Definitions
Table 38: Variable Type Definitions
Type Description
UINT1
unsigned integer – 1 byte
UINT2
unsigned integer – 2 bytes
UINT4
unsigned integer – 4 bytes
INT1
signed integer – 1 byte
INT2
signed integer – 2 bytes
INT4
signed integer – 4 bytes
Naming Conventions
Table 39 presents a summary of the naming conventions followed by all PMC-Sierra driver
software. A detailed description is then given in the following sub-sections.
The names used in the drivers are verbose enough to make their purpose fairly clear. This makes
the code more readable. Generally, the device’s name or abbreviation appears in prefix.
Table 39: Naming Conventions
Type Case Naming convention Examples
Macros Uppercase
prefix with
“m” and device abbreviation
mSUNI4x622_GET_BIT
Constants Uppercase prefix with device abbreviation
SUNI4x622_MAX_POLL
Structures Hungarian
Notation
prefix with
“s” and device abbreviation
sSUNI4x622_DDB
API Hungarian prefix with device name
suni4x622Add()