TWL-SDK functions can be grouped into categories according to their purpose. They have been given names that help make these categories clear.
Syntax: [A-Z][A-Z0-9]+
| OS | Items related to the operating system. |
|---|---|
| G2,G3,GX... | Items related to graphics. (Numerals are also included.) |
| MI | Items related to memory exchange, such as DMA. |
| SVC | Items related to system calls. |
(03/11/13)
Note: The distinction in the main processor and subprocessor categories was eliminated. Uppercase letters are used uniformly and consistently.
(04/01/18)
Functions are named as follows: Subject and object are connected without an underscore. The first letter of each separate word is capitalized.
Examples: OS_SetInterruptMask, OS_IsLocked
Example: OSi_SetInterruptMaskBase
However, there are some functions that do not follow these rules, such as OS_InterruptHandler.
(03/11/13)
There are two different names that can be given to a function that generates or initializes objects: Create or Init. Create is used when a function must later be called to explicitly destroy the object. Init is used when when the object does not need to be destroyed.
(03/12/15)
Functions and types are the same since the name used in typedefs fundamentally adhere to Nintendo GameCube conventions. Note that a verb is not used after the category name.
Example: OSInterruptCallback
Example: OSCopyMode
As an exception, names such as OSCopyMode are given to functions used to control the operations of the API itself. This particular function, for example, is likely to control the operation of a function with a name like GXCopy. Names such as GXCopyStatus and GXCopyType are other possibilities. Although this is recognized as a natural way to name such functions, do not take this concept too far.
(03/11/13)
Constants defined by enum, define, and const have the format shown below.
Examples: OS_INTERRUPT_MAX, OS_INTERRUPT_MAX
(04/01/18)
TWL-06-0011-001-B
CONFIDENTIAL