I am following a DIY guide that requires me to patch two arduino core library files: HID.cpp
and USBAPI.h
. This is not really practical for many reasons. I am not a native C programmer, but I am sure there are better ways to achieve the same without messing directly with system files. How can I override system library files without modifying the originals?
-
That all depends on what the modifications are you need to do...– MajenkoNov 4, 2015 at 18:05
-
@Majenko principally it adds a third device description (HID Remote) to the two devices that are described in those two files (Keyboard and Mouse). I can upload a diff.– retrographyNov 4, 2015 at 18:30
-
Can't you just place a copy in the sketches folder and alter this local copy?– GerbenNov 4, 2015 at 19:03
1 Answer
Unfortunately there really isn't any way of doing that other than modifying those files. The good news is that it is perfectly viable to make the modifications under a different "core" and then amend boards.txt with the core containing the modifications.