Fichiers » Historique » Version 2
Patrice Nadeau, 2024-01-27 14:18
| 1 | 1 | Patrice Nadeau | # Fichiers |
|---|---|---|---|
| 2 | 2 | Patrice Nadeau | |
| 3 | ## Règles |
||
| 4 | 1 | Patrice Nadeau | Le nom des fichiers DOIT être composé de la manière suivante : |
| 5 | 2 | Patrice Nadeau | 1. Un préfixe de 8 caractères maximum |
| 6 | 1. Lettres minuscule |
||
| 7 | 1. Chiffres |
||
| 8 | 1. Trait de soulignement |
||
| 9 | 1. Un des suffixe suivants : |
||
| 10 | 1. `.h` : entête |
||
| 11 | 1. `.c` : sources |
||
| 12 | 1. Contient une section Doxygen : |
||
| 13 | 1. `@file` : Le nom du fichier |
||
| 14 | 1. `@brief`: Une brève description |
||
| 15 | 1. `@version`: Le numéro de version |
||
| 16 | 1. `@date`: La date de dernière modification |
||
| 17 | 1. `@author`: Une liste des participant(e)s et leur courriel |
||
| 18 | 1. `@copyright`: La liste des années et participant(e)s |
||
| 19 | 1. Les fichiers d’entête contiennent en plus |
||
| 20 | 1. Une définition macro pour éviter de ré-inclure le fichier. |
||
| 21 | 1 | Patrice Nadeau | |
| 22 | 2 | Patrice Nadeau | ## Exemple |
| 23 | 1 | Patrice Nadeau | ```c |
| 24 | #ifndef _test_h |
||
| 25 | #define _test_h |
||
| 26 | /** |
||
| 27 | * @file : test.h |
||
| 28 | * @brief Description |
||
| 29 | * @version 0.00.01 |
||
| 30 | * @date 2023-02-26 |
||
| 31 | * @author Patrice Nadeau <pnadeau@patricenadeau.com> |
||
| 32 | * @copyright 2023 Patrice Nadeau |
||
| 33 | */ |
||
| 34 | |||
| 35 | /** |
||
| 36 | 2 | Patrice Nadeau | #ifndef _usart_h |
| 37 | #define _usart_h |
||
| 38 | /** |
||
| 39 | * @file : test.h |
||
| 40 | 1 | Patrice Nadeau | * @brief ATMEL AVR 8-bit C librairie |
| 41 | 2 | Patrice Nadeau | * @version 0.00.01 |
| 42 | * @date 2023-02-26 |
||
| 43 | * @author Patrice Nadeau <pnadeau@patricenadeau.com> |
||
| 44 | * @copyright 2023 Patrice Nadeau |
||
| 45 | 1 | Patrice Nadeau | * @pre AVR supportés (testés en gras) : |
| 46 | * - ATmega88 |
||
| 47 | * - ATmega168 |
||
| 48 | * - **ATmega328P** |
||
| 49 | */ |
||
| 50 | |||
| 51 | ... |
||
| 52 | |||
| 53 | 2 | Patrice Nadeau | #endif /*_usart_h*/ |
| 54 | 1 | Patrice Nadeau | ``` |