Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision |
| en:software:homelab:library [2010/02/08 14:33] – Page moved from en:software:library to en:software:homelab:library mikk.leini | en:software:homelab:library [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 |
|---|
| ====== Kodulabori teek ====== | ====== Robotic HomeLab Library ====== |
| |
| Kodulabori teek moodustub mitmetest C-keele päisefailidest (".h" laiendiga) ja ühest staatiliselt C-keele teegi failist (".a" laiendiga). Teegi installeerimisel kopeeritakse kõik teegi failid AVR-GCC alamkaustadesse, kust kompilaator nad lihtsalt üles leiab. Kasutaja teeki või selle osasid oma rakenduse kausta kopeerima ei pea. Järgnevalt on kirjeldatud teegi funktsionaalsust. Sellest, kuidas kodulabori teeki reaalselt Windowsi või Linuxi operatsioonisüsteemiga kasutada, räägib esimene praktiline harjutus. | HomeLab library is composed of several C language header files (with ".h" extension) and one static library file (with ".a" extension"). Upon library installation, all these files are copied to the AVR-GCC subdirectories where the compiler finds them automatically. The user does not have to copy these files to his or her program folder. |
| |
| Kodulabori veebilehel on vabalt kättesaadav Kodulabori teegi lähtekood mida on võimalik kohandada vastavalt oma projekti vajadustele. Allalaetavas teegis on ka lisafunktsioone mida käesolev raamat ei kirjelda. | [{{ :images:homelab:library:homelab_library_files.png|HomeLab library source code files}}] |
| | |
| | Step-by-step AVR development software installation instructions for Windows and Linux are written in the first chapter of practical examples. Although different practical examples use various parts of the library, all of them must include a static library (".a" file) in the project. Only header files can be included selectively. Header files which are directly related to the AVR microcontroller are in the "homelab" folder, HomeLab module specific files are in the "homelab/module" folder. Both these folders are in the compiler's root folder, and to include the files from them, less-than and greater-than signs are needed to specify the path. An example of how to include AVR pins and HomeLab motors library header files: |
| | |
| | <code c> |
| | #include <homelab/pin.h> |
| | #include <homelab/module/motors.h> |
| | </code> |
| | |
| | If HomeLab library is not used, then the following avrlibc header file needs to be included into the project: |
| | |
| | <code c> |
| | #include <avr/io.h> |
| | </code> |
| | |
| | In the HomeLab library, this file is already included in the //pin.h// file. |
| | |
| | HomeLab library installer is freely available on the HomeLab web-page. Users who are interested in customizing the library can also download the source code for it. The following chapters describe the functionality of the library. |