Raspberry Pi Basic
Andy D (2714) 1 post |
Does anyone know of a forum discussing Raspberry Pi RISC OS ARM BBC BASIC VI? Particularly how to access USB ports and whether OSBYTE and OSWORD calls are implemented. |
Rick Murray (539) 13840 posts |
Could start here? :-)
Complicated. USB ports are accessed through the “DeviceFS” interface, so at the very least you will need to enumerate the connected USB devices to determine which device is the one you want and then look for the appropriate endpoints. Don’t forget to free all of those memory blocks as you go… These endpoints, when found, can be opened as file handles using something like:
SYS “OS_Byte” and SYS “OS_Word”, perhaps? ;-) If you are coming from a Beeb background, then: OS_Word OS_Byte Example Is the user holding down a Ctrl key? Here is the BBC Micro version (which will actually work on RISC OS, though it is not recommended these days!):
Here is the RISC OS version:
|