hallo zusammen , kann mir vieleicht jemand helfen die rfm12lib in avr studio einzubinden? bekomm ich einfach nicht hin und mein englisch ist echt schlecht. danke schonmal im vorraus. http://www.hansinator.de/rfm12lib/
Was bekommst du denn "nicht hin"? Das alles ist ja keine echte lib, sondern das sind ganz normale source-files. Pack die ins gleiche Verzeichnis, wie deine eigenen Sourcen. Dann fügst du im Studio unter Source rfm12.c hinzu, genauso wie deine eigenen Dateien. Das wars schon. Allerings ist die ganze Doku auf Englisch, da wirst du dann doch mal den babelfish anwerfen müssen. Oliver
HI OLIVER HAB JETZT IM STUDIO unter Source rfm12.c hinzuGEFÜGT,und deb rest einfach in den ordner meiner anderen programme kopiert SAGT aber trotzdem ../rfm12.h:281:33: error: include/rfm12_extra.h: No such file or directory ../rfm12.h:282:32: error: include/rfm12_ctrl.h: No such file or directory ../crfm.c:150:18: error: uart.h: No such file or directory aber im folgenden steht doch noch irgendwas von wrapper files. mfg Next you will have to download the library (if you haven't done so yet) and place it somewhere next to your source folder. In order to run, the library will need some configuration, which is stored in a header file usually named rfm12_config.h. See the section Configuration for more information on how to configure the library. Otherwise just take the demo configuration header from the library folder, put into your source folder and change the values to your needs. The library itself will not include the configuration file, you have to do this manually before including the rfm12.h header. However, the rfm12.c file will need a special wrapper. To use the library with your project, it's advised to create two wrapper files, which will simplify your makefile and include the library configuration. Just create two files, rfm12.c and rfm12.h inside your source folder and include the RFM12 configuration header (usually rfm12_config.h), as well as the real rfm12.c and rfm12.h. Here's an example: rfm12.h #include "rfm12_config.h" #include "../rfm12lib/rfm12.h" rfm12.c #include "rfm12_config.h" #include "../rfm12lib/rfm12.c" This way the configuration is correctly supplied to the library and you will only need to add rfm12.c to your makefile or project to compile the library. Finally, you just need to include your rfm12.h to use the library!
Nun ja, da musst du entweder die Includepfade anpassen (unter den Projektsettings), oder im fehlerhaften #include den Pfad anpassen. Oliver
In der 1.1.0 ist der Verzeichnisbaum wie im Anhang gelistet. Das Verzeichnis mit der Library heisst src und das Verzeichnis mit dem Demoprojekt test-m8. Achtung: Es gibt zwei Pärchen von Dateien mit gleichem Namen! Einmal als echte Sourcedateien im Ordner src: 11.01.2010 23:22 21.123 rfm12.c 11.01.2010 23:22 8.443 rfm12.h und einmal als Stellvertreterdateien in deinem Projektordner, der sich auf auf gleicher Ebene wie der src Ordner befinden muss (s. test-m8 Ordner): 11.01.2010 23:22 54 rfm12.c 11.01.2010 23:22 54 rfm12.h Die letzten beiden plus deine angepasste rfm12_config.h kopierst du in deinen Projektordner und nimmst sie in dein Projekt auf. Alternative Wenn du das so nicht einrichten kannst, kannst du auch den kompletten Inhalt des src Ordners in deinen Projektordner kopieren und dann die Dateien 11.01.2010 23:22 21.123 rfm12.c 11.01.2010 23:22 8.443 rfm12.h plus deine angepasste rfm12_config.h in dein Projekt aufnehmen.
Oliver schrieb: > Was bekommst du denn "nicht hin"? > > Das alles ist ja keine echte lib, sondern das sind ganz normale > source-files. Pack die ins gleiche Verzeichnis, wie deine eigenen > Sourcen. Dann fügst du im Studio unter Source rfm12.c hinzu, genauso > wie deine eigenen Dateien. > > Das wars schon. > > Allerings ist die ganze Doku auf Englisch, da wirst du dann doch mal den > babelfish anwerfen müssen. > > Oliver das ist ein laborant wenn du fragen hast: discuss@das-labor.org
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.