Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant compile it #1

Open
ch0mik opened this issue Jul 28, 2022 · 1 comment
Open

i cant compile it #1

ch0mik opened this issue Jul 28, 2022 · 1 comment

Comments

@ch0mik
Copy link

ch0mik commented Jul 28, 2022

Arduino:1.8.19 (Linux), Płytka:"Arduino Nano, ATmega328P"











In file included from ./A500_HID/A500_HID.ino:14:0:
/opt/arduino-1.8.19/libraries/Keyboard/src/Keyboard.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]
 #warning "Using legacy HID core (non pluggable)"
  ^~~~~~~
A500_HID:28:5: error: 'KeyReport' does not name a type
     KeyReport _keyReport;
     ^~~~~~~~~
./A500_HID/A500_HID.ino: In function 'void setup()':
./A500_HID/A500_HID.ino:59:14: warning: large integer implicitly truncated to unsigned type [-Woverflow]
       DDRD = ~BITMASK_JOY1; // direction INPUT
A500_HID:63:7: error: 'DDRF' was not declared in this scope
       DDRF = ~BITMASK_JOY2; // direction INPUT
       ^~~~
./A500_HID/A500_HID.ino:63:7: note: suggested alternative: 'WDRF'
       DDRF = ~BITMASK_JOY2; // direction INPUT
       ^~~~
       WDRF
A500_HID:64:7: error: 'PORTF' was not declared in this scope
       PORTF = BITMASK_JOY2; // activate PULLUP
       ^~~~~
./A500_HID/A500_HID.ino:64:7: note: suggested alternative: 'PORT0'
       PORTF = BITMASK_JOY2; // activate PULLUP
       ^~~~~
       PORT0
./A500_HID/A500_HID.ino: In function 'void loop()':
A500_HID:15:37: error: 'HID' was not declared in this scope
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:75:9: note: in expansion of macro 'HID_SendReport'
         HID_SendReport(3, &Joy, 1);
         ^~~~~~~~~~~~~~
./A500_HID/A500_HID.ino:15:37: note: suggested alternative: 'PIND'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:75:9: note: in expansion of macro 'HID_SendReport'
         HID_SendReport(3, &Joy, 1);
         ^~~~~~~~~~~~~~
A500_HID:80:14: error: 'PINF' was not declared in this scope
       Joy = ~PINF & BITMASK_JOY2;
              ^~~~
./A500_HID/A500_HID.ino:80:14: note: suggested alternative: 'PIN0'
       Joy = ~PINF & BITMASK_JOY2;
              ^~~~
              PIN0
A500_HID:15:37: error: 'HID' was not declared in this scope
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:82:9: note: in expansion of macro 'HID_SendReport'
         HID_SendReport(4, &Joy, 1);
         ^~~~~~~~~~~~~~
./A500_HID/A500_HID.ino:15:37: note: suggested alternative: 'PIND'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:82:9: note: in expansion of macro 'HID_SendReport'
         HID_SendReport(4, &Joy, 1);
         ^~~~~~~~~~~~~~
A500_HID:157:39: error: '_keyReport' was not declared in this scope
                   if ((key==0x2B) && (_keyReport.modifiers & 0x22)) keystroke(0x35,0x00);  // ^ (with shift)
                                       ^~~~~~~~~~
./A500_HID/A500_HID.ino: In function 'void keypress(uint8_t)':
A500_HID:185:21: error: '_keyReport' was not declared in this scope
       if (k > 0x5f) _keyReport.modifiers |= ktab[key];  // modifier
                     ^~~~~~~~~~
A500_HID:188:15: error: '_keyReport' was not declared in this scope
           if (_keyReport.keys[i] == 0) {
               ^~~~~~~~~~
A500_HID:15:37: error: 'HID' was not declared in this scope
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:194:7: note: in expansion of macro 'HID_SendReport'
       HID_SendReport(2,&_keyReport,8);
       ^~~~~~~~~~~~~~
./A500_HID/A500_HID.ino:15:37: note: suggested alternative: 'PIND'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:194:7: note: in expansion of macro 'HID_SendReport'
       HID_SendReport(2,&_keyReport,8);
       ^~~~~~~~~~~~~~
A500_HID:194:25: error: '_keyReport' was not declared in this scope
       HID_SendReport(2,&_keyReport,8);
                         ^
./A500_HID/A500_HID.ino:15:57: note: in definition of macro 'HID_SendReport'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                                         ^~~~
./A500_HID/A500_HID.ino: In function 'void keyrelease(uint8_t)':
A500_HID:200:21: error: '_keyReport' was not declared in this scope
       if (k > 0x5f) _keyReport.modifiers &= ~ktab[key];  // modifier
                     ^~~~~~~~~~
A500_HID:203:15: error: '_keyReport' was not declared in this scope
           if (_keyReport.keys[i] == ktab[key]) _keyReport.keys[i] = 0;
               ^~~~~~~~~~
A500_HID:15:37: error: 'HID' was not declared in this scope
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:206:7: note: in expansion of macro 'HID_SendReport'
       HID_SendReport(2,&_keyReport,8);
       ^~~~~~~~~~~~~~
./A500_HID/A500_HID.ino:15:37: note: suggested alternative: 'PIND'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:206:7: note: in expansion of macro 'HID_SendReport'
       HID_SendReport(2,&_keyReport,8);
       ^~~~~~~~~~~~~~
A500_HID:206:25: error: '_keyReport' was not declared in this scope
       HID_SendReport(2,&_keyReport,8);
                         ^
./A500_HID/A500_HID.ino:15:57: note: in definition of macro 'HID_SendReport'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                                         ^~~~
./A500_HID/A500_HID.ino: In function 'void keystroke(uint8_t, uint8_t)':
A500_HID:212:38: error: '_keyReport' was not declared in this scope
       unsigned short memomodifiers = _keyReport.modifiers; // save last modifier state
                                      ^~~~~~~~~~
A500_HID:15:37: error: 'HID' was not declared in this scope
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:217:14: note: in expansion of macro 'HID_SendReport'
              HID_SendReport(2,&_keyReport,8);
              ^~~~~~~~~~~~~~
./A500_HID/A500_HID.ino:15:37: note: suggested alternative: 'PIND'
 #define HID_SendReport(id,data,len) HID().SendReport(id,data,len) // IDE 1.6.9
                                     ^
./A500_HID/A500_HID.ino:217:14: note: in expansion of macro 'HID_SendReport'
              HID_SendReport(2,&_keyReport,8);
              ^~~~~~~~~~~~~~
exit status 1
'KeyReport' does not name a type

@ch0mik
Copy link
Author

ch0mik commented Jul 28, 2022

im using the built-in libs
Użycie biblioteki Keyboard w wersji 1.0.2 z folderu: /opt/arduino-1.8.19/libraries/Keyboard
Użycie biblioteki HID w wersji 1.0 z folderu: /opt/arduino-1.8.19/hardware/arduino/avr/libraries/HID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant