Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

107 linhas
4.3 KiB

  1. libopencm3 Documentation
  2. 12 October 2012 (C) K Sarkies
  3. -----------------------------
  4. Each family and subfamily of devices has a separate directory and configuration
  5. files. Doxygen is run independently on each of these and the result is
  6. integrated under a single HTML page.
  7. Due to relative referencing used in the files, the directory
  8. structure is important and should be maintained.
  9. The Makefile will automatically generate the list of input files based on the
  10. current library makefiles, so you _must_ have run built the library itself first.
  11. Each of the subdirectories has a configuration file, a layout file and
  12. subdirectories for the documentation. Doxygen is intended to be run inside
  13. these subdirectories. The Makefile will handle this in the appropriate
  14. order.
  15. Markup
  16. ------
  17. Each family has been given a group name that will allow subgrouping of API
  18. functions and defines in the documentation.
  19. The header and source files for each peripheral in each family must have a
  20. heading section in which an @defgroup defines the group name for the particular
  21. peripheral. This group name will be the same across all families as each one
  22. is documented separately. Thus for a peripheral xxx the header will have a
  23. group name xxx_defines and the source file will have xxx_file. This will allow
  24. the group to appear separately. An @ingroup must be provided to place the group
  25. as a subgroup of the appropriate family grouping. Note that @file is not used.
  26. The heading section must include the version number and date and authors names
  27. plus a license reference. Any documentation specific to the family can be
  28. included here. If there are common files included then their documentation will
  29. appear in a separate section.
  30. Common header and source files that are included into a number of families must
  31. have an @addgroup to include its documentation into the appropriate peripheral
  32. group. These headings may include authors and any specific descriptions but the
  33. date and version number must be omitted as it will be included from the family
  34. files. There must not be any reference to family groupings as these common files
  35. will be incorporated into multiple family groups.
  36. The common files should not be included in an application explicitly. Also the
  37. doxygen preprocessor must be enabled to ensure that all macros and defines are
  38. included. This means that common header files need to have a section at the top
  39. of the file of the type (eg for gpio_common_f24.h):
  40. /** @cond */
  41. #ifdef LIBOPENCM3_GPIO_H
  42. /** @endcond */
  43. and at the end of the file:
  44. /** @cond */
  45. #else
  46. #warning "gpio_common_f24.h should not be included explicitly, only via gpio.h"
  47. #endif
  48. /** @endcond */
  49. This will stop the compiler preprocessor from including the common header file
  50. unless the device family header file has also been included. The doxygen
  51. conditional clauses are needed to stop the doxygen preprocessor seeing this
  52. statement and so excluding processing of the common file contents.
  53. /** @cond */
  54. #if defined(LIBOPENCM3_GPIO_H) || defined(LIBOPENCM3_GPIO_COMMON_F24_H)
  55. /** @endcond */
  56. Each helper function must have a header with an @brief, and where appropriate
  57. additional description, @parameter and @return elements. These latter must
  58. describe the allowable parameter ranges preferably with reference to a suitable
  59. define in the corresponding header file.
  60. The Doxyfile for a family must include input files from the header and source
  61. subdirectories, as well as all needed common files. The common files can be
  62. added separately or as an entire directory with exclusions of inappropriate
  63. files.
  64. Doxyfiles
  65. ---------
  66. Doxyfile_common holds global settings.
  67. OUTPUT_DIRECTORY blank so that the output is placed in the current directory.
  68. RECURSIVE = NO
  69. EXTERNAL_GROUPS = NO
  70. Each Doxyfile_include for a processor family has:
  71. @INCLUDE = ../Doxyfile_common
  72. INPUT = specific directories needed, including /include/libopencm3/cm3
  73. in top directory to set the top level page and GNU license.
  74. LAYOUT_FILE = DoxygenLayout_$processor.xml
  75. WARN_LOGFILE = doxygen_$processor.log
  76. TAGFILES = ../cm3/cm3.tag=../../cm3/html
  77. GENERATE_TAGFILE = $processor.tag
  78. PREDEFINED = list of macro definitions
  79. For the top level Doxyfile
  80. INPUT = ../include/libopencm3/docmain.dox to add in the main page text
  81. LAYOUT_FILE = DoxygenLayout.xml
  82. WARN_LOGFILE = doxygen.log
  83. TAGFILES = cm3/cm3.tag=../cm3/html plus all families to be included.