I've basicly now rewritten the whole thing...
I should have started a bit more object oriented way. Now there is the AROSXClass and it has AROSXClassController which in turn can be XInput gamepad. The arosx.library does nothing at the moment but now it is actually working (can be opened and closed...), it was just a quick copypastemonkeycode from the first thing I found on the AROS tree.
I've looked at a lot of game controller API's and they pretty much just poll the inputs, let's see what the arosx.library will house.
As the arosx.library is part of the arosx.class (just a different interface exposed to outside world) I'm thinking just to use arosx.class memory as if it belonged to arosx.library. Or pass around messages.
Maybe messaging is better suited... Don't know... For force feedback it might be beneficial to have a queue of ff-commands with duration and instant flush of the queue when needed.
Yesterday I tried to find how the battery information is passed on the USB, but my Windows machine is W7 and it has older xinput. Not sure if it provides such information. I installed vs2017 and got at least one example that polled the inputs and send ff commands to work.
For the Logitech F710 wireless gamepad arosx.class shows that it is wireless and when it goes to sleep mode and when it wakes, not sure if it will work the same with different wireless controllers.