Skip to content

Conversation

@M0stafaRady
Copy link
Contributor

No description provided.

Copy link
Contributor

@marwaneltoukhy marwaneltoukhy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a mix of standards, some variables have upper case, underscore and camel case. Typically the standard is:
Functions & local variables: all lower case and separated by "_"
Classes: Camel case
Global Variables: Upper case and separated by "_"

@M0stafaRady
Copy link
Contributor Author

M0stafaRady commented Jun 18, 2023

Functions & local variables: all lower case and separated by "_"

The standard used here is <interfacename>_<function named Camel case >

}

void bb_configure_all_gpios(unsigned int config){
void bb_configureAllGpios(unsigned int config){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example here it's a mix of "_" and camel case

@marwaneltoukhy
Copy link
Contributor

marwaneltoukhy commented Jun 18, 2023

Functions & local variables: all lower case and separated by "_"

The standard used here is _

It's okay to comeup with a standard for your code, but it's important to keep it consistent, for example; if the iterfacename is going to be all caps, it should be consistently all caps. More examples:
IRQ_getFlag, the interface is all caps, but in GPIOs_readHigh it is not, and LogicAnalyzer_inputEnable is camel case.
Also, are you using the whole interface name or the acronym? looks like your using acronyms in all the function names except with LA.

Base automatically changed from sky130_speedup to main March 19, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants