Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change C APIs names #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

change C APIs names #58

wants to merge 1 commit into from

Conversation

M0stafaRady
Copy link
Member

No description provided.

Copy link
Member

@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
Member 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 >

@@ -90,7 +90,7 @@ void bb_configure_2_gpios(unsigned int configL,unsigned int configR){
}
}

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

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
Member

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.

2 participants