Description
When using smaller microcontrollers, like the LPC11U23, some USB functions take up a considerable amount of memory, and do fit or leave too little memory for useful work (depending on compiler and std. libraries used; KEIL performing better than GCC). One solution is not to include the Stream class, and remove this from the USB classes. Now it does fit (of course you loose the standard Stream functionality on the interface):
For example: modify line 92 of USBKeyboard.h from:
class USBKeyboard: public USBHID, public Stream {
to
class USBKeyboard: public USBHID {
Note: A similar issue is occurs with the Serial() class, you can remove the Stream or access the C-api directly to conserve memory.
Question: Can a build option be provided for compilation without Stream classes?
(e.g. NOCPPSTREAM?)