USB I/O example code
Matt (481) 28 posts |
Hi, Can anyone point me in the direction of some example USB source? Ideally some code that just sends and receives a few bytes… Something like this excellent android example Thanks, Matt |
Steffen Huber (91) 1945 posts |
Sadly, I cannot find the DeviceFS USB docs once hosted on the Castle/IYONIX site, Basically, you use DeviceFS to scan for USB devices and their endpoints. Then you open up a “file” via DeviceFS to connect to an endpoint and just read/write via OS_GBPB. I am sure Dave Higton had some easy-to-follow examples in BASIC…try this URL: http://davehigton.me.uk/ |
Matt (481) 28 posts |
Thanks, great – that looks easier than I thought. Has anyone made a usb midi driver? |
Jeffrey Lee (213) 6046 posts |
There’s an updated copy of the doc in CVS – https://www.riscosopen.org/viewer/view/mixed/RiscOS/Sources/HWSupport/USB/USBDriver/build/Doc/USB?rev=1.6 One of my bugbears with the Castle USB stack is that at the lowest level USB is packet based, while DeviceFS is stream based, so it can make it very hard to work with devices which rely on the packet-based behaviour (i.e. where the length of a packet is significant) |
Rick Murray (539) 13401 posts |
https://www.riscosopen.org/forum/forums/11/topics/1651?page=7#posts-66006 Instructions: http://heyrick.co.uk/random/usb-midi-0-01-user-guide-preliminary.pdf Basically, it’s intended to be a clone of the original Acorn MIDI module, only talking to USB devices. |
Matt (481) 28 posts |
That’s great news – I have the same interface so should work for me – good work :) Though is Maestro the only 32bit sequencer? Did Melidi get 32bit’ed after? Anthem? MidiWorks was my personal favourite… |
David Feugey (2125) 2687 posts |
There are discussions about if a 26bit sequencer working under Aemulor could use the 32bit Midi module. It should. But perhaps that the problem will be MidiSupport (still 26bit) and not the sequencer. All of this needs to be tested. |