espressif / esp-idf-cxx

C++ wrapper classes for ESP-IDF components.
Apache License 2.0
79 stars 14 forks source link

Naming convention in GPIO #19

Closed CyrilB1531 closed 1 year ago

CyrilB1531 commented 1 year ago

All classes defined in gpiocxx uses the following naming convention: GPIO but Output and OpenDrain use GPIO

As the project follows esp-idf coding style, these classes should be GPIOOutput and GPIOOpenDrain

0xjakob commented 1 year ago

@CyrilB1531 We appreciate your sense for detail and noticing the diversion from the IDF style-guide. In this case, however, the diversion has been a conscious decision that we made to increase the readability of the name. GPIO_Output is more readable than GPIOOutput in our opinion.

Among the goals of the style-guide are readability and consistency. In rare cases like this, these two goals collide and a decision has to be made what is more important.

CyrilB1531 commented 1 year ago

Ok, i will close the issue then

0xjakob commented 1 year ago

@CyrilB1531 We made this explicit in the IDF code style guide. The change should be visible when the IDF master branch is updated the next time.