Is it possible to get this working on more modern processors?
I'm trying to get this library to work with a Arduino nano ble 33 IOT which uses a Samd21 processor. What would the best way be to go about this?
Thank you!
You'll have to check the LUFA website and documentation about this. AFAIK, LUFA is exclusively for AVR processors. As the SAMD21 is an ARM processor, you'll probably need to look for another solution.
What do you need to use LUFA for anyway? The standard Arduino USB device functionality should get you quite far.
It's to allow the Arduino to emulate a PS4 controller using a library which uses the LUFA library.
Apparently the standard USB library lacks some of the low level functionality that LUFA provides access to: https://github.com/fraca7/dsremap/issues/2
I see! Yeah, this is quite annoying, but I think you're pretty much out of luck here and your best bet is to find different hardware that supports both LUFA (i.e. uses an AVR processor) and BLE. The reason is that the whole build-pipeline of LUFA relies on the AVR processor architecture and the avr-gcc compiler. The SAMD21 is an ARM processor, so it has a completely different architecture and uses the arm-gcc compiler. I'm sure someone with A LOT of experience could make it work, but I think we both don't have the necessary know-how.
It's not impossible, though! NXP ported LUFA to ARM in 2011, and people have already forked that. It seems to be compatible with Cortex-M0+, so maybe you can re-use the Hardware Abstraction Layers that Arduino is using for that processor?
You'd have to do all that work first, and could afterwards adapt Arduino-Lufa to insert the result as a library for Arduino.
Thank you, I'll have a dig around and see if I can figure it out!