felis / USB_Host_Shield_2.0

Revision 2.0 of USB Host Library for Arduino.
https://chome.nerpa.tech
1.77k stars 782 forks source link

Is there any way to setup the SPI_SS pin and INTR pin from the main sketch? #812

Open mSlider opened 2 months ago

mSlider commented 2 months ago

I know that for change SPI_SS pin and INTR pin has to be done in "UsbCore.h", but this has the inconvenient that if I use diferent hardware boards with the same processor I have to modify the library ("UsbCore.h") each time I compile for one of those boards.

Is there any way to setup or change SPI_SS pin and INTR pin from the main sketch or setup function?

Thanks!!!

xxxajk commented 2 months ago

You can do that in UHS3, but if UHS3 willl fit what you want to do, or needs a specific driver, right now that's on you.

mSlider commented 2 months ago

Thank you for the info about UHS3 but I'd prefer to stay with UHS2 for now because it's running really stable.

If you have another solution to modify the library to make a function to call from main sketch for change SPI_SS and INTR pin please feel free to post here.

xxxajk commented 2 months ago

Unfortunately the only recourse would be to either make a separate library (which is a pretty awful way to do it) or to make a second user account on your computer, change what you need to change, and do the compiles on that account.

UHS3 is stable for everything I have used it for. I don't even use 2.0 or the smaller AVRs anymore. What board are you using?

mSlider commented 2 months ago

I've tried the UHS3 library with Leonardo and nothing happens with the HID_RAW example.

Also I see the sketch ocupped near 90% of the memory space, so I't can fit all the rest of routines in my programs.

If there is no solution for my request please feel free to close the issue!