Some of the symbol names in the API header use camel case (ExampleCamelCase), while others use snake case (Example_Snake_Case). This needs to be sorted out before symbol names are frozen for v1.0.
All of the typedefs, enum and struct tags, function formal parameters, and struct fields use camel case. The later two types have a leading lower-case character.
Macros, enumerators, and functions currently use snake case to varying degrees.
In all cases, the SDM prefix is separated by an underscore.
Macros are all uppercase and therefore need underscores to separate words for readability.
The intent for enumerators was to put underscores between groupings to allow for better readability. However, this hasn't always been followed, though.
The recommendation is more readable and consistent than before if all the enum names are changed to camel snake case and I think the separation of the description in the enum name is good as this also adds to making the names more consistent.
If camel snake case is being adopted then I think there is no problem having more than one grouping.
Some of the symbol names in the API header use camel case (
ExampleCamelCase
), while others use snake case (Example_Snake_Case
). This needs to be sorted out before symbol names are frozen for v1.0.All of the typedefs, enum and struct tags, function formal parameters, and struct fields use camel case. The later two types have a leading lower-case character.
Examples:
Macros, enumerators, and functions currently use snake case to varying degrees.
SDM
prefix is separated by an underscore.Enumerator examples showing differences follow.
As can be seen, whether and how enumerator names currently use groupings varies.
Recommendation:
SDM
and the rest of the symbol name.SDM
and add enum type, then a single underscore to separate the enumerator description:SDMControlState_Active
SDMResetType_Default
SDMDebugArchitecture_ArmADIv5
SDMTransferSize_8
SDMDeviceType_ArmADI_AP
SDMDeviceType_ArmADI_CoreSightComponent
SDMTransferAttr_ArmADI_Nonsecure
SDMTransferAttr_ArmADI_DirectAttrEnable
Questions and comments?