hallo
ich versuche das tutorial durchzuspielen von avr-cpp.de.
jedoch verstehe ich nicht, wie ich mit avr studio diese programme dann
in hex format umwandeln kann. wie muss ich avr studio einstellen, bzw
was muss ich mir zusätzlich downloaden??
beispiel bisherige programme, welche ich ohne probleme build ausfühen
konnte um die hex zu generieren, sahen so aus:
1 | int main (void){
|
2 |
|
3 | initPorts(); // initialize ports
|
4 | testing();
|
5 |
|
6 | //return 0; // not needed because of void
|
7 | }
|
jetzt mit c++ sieht ein programm beispiel so aus:
1 | class Application : public Controller
|
2 | {
|
3 | protected: Button button1;
|
4 | protected: Led ledRed;
|
5 |
|
6 | public: void onStart()
|
7 | {
|
8 | button1.config(portD,bit2);
|
9 | ledRed.config(portB,bit0);
|
10 | }
|
11 |
|
12 | public: void onWork()
|
13 | {
|
14 | if (button1.isPressed())
|
15 | {
|
16 | ledRed.on();
|
17 | }
|
18 | else
|
19 | {
|
20 | ledRed.off();
|
21 | }
|
22 | }
|
23 |
|
24 | } app;
|