Coding Standards - AtlantsEmbedded/IntelliPi Wiki

IntelliPi's code and API's are to be focused around using the indent --linux option. This is the standard used by the Linux kernel for drivers and easily added into geany through their format facility.

--linux OR: -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1

Function Names:

Function names should be readable as follows:

int data_interface_preprocessing(struct_t input_t) {

return (0); }

Documentation standards:

For functions:

/**

  • int csv_write_in_file(void *param)
  • @brief Writes the data received in a csv file, skipping a line at the end
  • @param csv_file_ptr, must be pointing to a data_t
  • @param input, points to input data
  • @return if successful, EXIT_SUCCESS, otherwise, EXIT_FAILURE */

For files:

/**

  • @file csv_file.c
  • @author Frederic Simard, Atlants Embedded ([email protected])
  • @date
  • @brief Handles the CSV file function pointers
  • @note (optional) */