This is an old revision of the document!


Exemples

Les exemples pratiques sont construits dans un style uniforme et le plus concrètement possible. Chaque exemple commence par une petite introduction théorique et donne les connaissances nécessaires à la réalisation de la partie pratique qui suit. La partie pratique contient un exemple commenté du code source du programme. On utilise habituellement dans les exemples les fonctions de la librairie du HomeLab, mais dans certains cas on utilisera la méthode de configuration des registres. Le premier chapitre est un peu différent et à un objectif légèrement différent. Il permet de décrire les étapes nécessaires à l'installation et la configuration des logiciels nécessaires. Ces exemples concernent les systèmes d'exploitation Windows ou Linux. Les chapitres et exemples pratiques fonctionnent sous l'un ou l'autre des deux systèmes d'exploitation.

 

Construction

Pour compléter les exemples pratiques, il y a à chaque chapitres, une liste de connaissances nécessaires. Cette liste est liée à d'autres chapitres du livre, marqués avec les icônes suivantes:

  • [HW] Module physique utilisé dans l'exemple.
  • [LIB] Partie de la librairie utilisée dans l'exemple.
  • [ELC] Référence au chapitre des bases de l'électronique.
  • [AVR] Référence au chapitre du module du micro-contrôleur AVR.

Basic software of the examples

As mentioned before, practical code samples are composed on the basis of the library of the HomeLab. There are most used specific AVR operations and procedures connected with the HomeLab’s modules written in the library. The usage of the library means that the user does not have to write a hardware close ??, capable for using registers?? program code to start the modules, although this opportunity exists always. Separating the software which communicates with hardware from the examples and exercises, allows the user to focus on creating his/hers own algorithm instead of peculiarities not connected to the hardware.

Code style of the examples

The example programs are written in one style, to achieve more synoptic program code. Uniform style makes the program more readable and prevents making simple syntax mistakes. It is advised to follow a certain style when making exercises. The main characteristics of the style:

  • Program, all its functions and variables are in English and in small letters the words are separated with an under-strike.
  • Functions are in following form: object_action_subject.
  • more important places in the program are commented.
  • Every block in C-language (marked with { and } )starts and begins in separate row.
  • Blocks are tabulated with tabulator keys. Tabulator is not used inside rows.
fr/examples.1268134902.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0