Edit: I have debugged for a bit longer and realized that I didn't provide enough information in the code. So here is the updated Version. My mistake.
For some reason I can't compile my project when I try to use Mouse.h's methods when MouseController.h is included. Code is relevant, I have tested it, and the error code is still the same.
#include <Mouse.h>
#include <MouseController.h>
void setup()
{
Serial.begin(115200);
Mouse.begin();
}
void loop()
{
}
C:\Users\user\Documents\Arduino\sketches\project\project.ino: In function 'void setup()':
C:\Users\user\Documents\Arduino\sketches\project\project.ino:6:3: error: 'Mouse' was not declared in this scope
Mouse.begin();
^
exit status 1
Compilation error: 'Mouse' not found. Does your sketch include the line '#include <Mouse.h>'?
Also the error message changes if you declare either Mouse.h first or second, here is the alternative
n file included from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:24:0,
from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/MouseController.h:22,
from C:\Users\loren\Documents\Arduino\sketches\project\project.ino:2:
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hid.h:156:21: error: 'HID' is not a type
virtual void Parse(HID *hid, bool is_rpt_id, uint32_t len, uint8_t *buf) = 0;
^
In file included from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/MouseController.h:22:0,
from C:\Users\loren\Documents\Arduino\sketches\project\project.ino:2:
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:62:21: error: 'HID' is not a type
virtual void Parse(HID *hid, bool is_rpt_id, uint32_t len, uint8_t *buf);
^
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:160:21: error: 'HID' is not a type
virtual void Parse(HID *hid, bool is_rpt_id, uint32_t len, uint8_t *buf);
^
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:163:28: error: 'HID' is not a type
uint8_t HandleLockingKeys(HID* hid, uint8_t key);
^
In file included from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/MouseController.h:22:0,
from C:\Users\loren\Documents\Arduino\sketches\project\project.ino:2:
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h: In member function 'virtual uint32_t HIDBoot<BOOT_PROTOCOL>::Poll()':
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:547:56: error: no matching function for call to 'HIDReportParser::Parse(HID*, int, uint32_t, uint8_t [16])'
pRptParser->Parse((HID*)this, 0, (uint32_t)read, buf);
^
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:547:56: note: candidate is:
In file included from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hidboot.h:24:0,
from C:\Users\loren\Documents\Arduino\libraries\USBHost\src/MouseController.h:22,
from C:\Users\loren\Documents\Arduino\sketches\project\project.ino:2:
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hid.h:156:15: note: virtual void HIDReportParser::Parse(int*, bool, uint32_t, uint8_t*)
virtual void Parse(HID *hid, bool is_rpt_id, uint32_t len, uint8_t *buf) = 0;
^
C:\Users\loren\Documents\Arduino\libraries\USBHost\src/hid.h:156:15: note: no known conversion for argument 1 from 'HID*' to 'int*'
exit status 1
Compilation error: exit status 1