This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

coding variable naming conventions

Hi, this is my first time I write on this forum and I hope to find some useful suggestions for my work on Nordic platform. I work since many months on nRF81522 chip and I noted the pretty coding used in Nordic's API for naming convention; I'd like to know which is the standard used, like 'Hungarian' and so on... In fact I'd like to use this same standard beacuse I also use it since many time (even if I don't know which is). Please could anyone help me ? Regards

Parents
  • Hi,

    We're not following a specific coding standard, but we've used some as inspiration for our internal coding standard. We use prefixes for globals (g_), static (m_), and no prefix on auto-variables. The SoftDevice API calls are all prefixed with sd_, while functions in BLE profiles are prefixed with ble_.

    Indentation style is allman: en.wikipedia.org/.../Indent_style

    Cheers, Håkon

Reply
  • Hi,

    We're not following a specific coding standard, but we've used some as inspiration for our internal coding standard. We use prefixes for globals (g_), static (m_), and no prefix on auto-variables. The SoftDevice API calls are all prefixed with sd_, while functions in BLE profiles are prefixed with ble_.

    Indentation style is allman: en.wikipedia.org/.../Indent_style

    Cheers, Håkon

Children
No Data