Edit: 2020-09-17: added the KbMObjDemos v0.1.4 .zip package.
Edit: 2019-05-20: added the P2asm version .zip package.
Edit: 2019-05-18: update v0.02 (minor changes) and added the port A/B and the verbose enumeration .zip packages.
P2-Eval board + Serial Host accessory board, using pins 16..24 (16..25 if using A/B ports). Pin definitions are at the top of the 1CogKbm.spin2 file.
Sysclock 160MHz, 230400 baud serial.
Compile/run using fastspin and loadp2 and its built-in -t option terminal.
The Spin2 top object file is KbMObjTest.spin2. The 1CogKbM.spin2 file is a one cog USB host + keyboard/mouse driver. The P2 pin usage is documented at the top of the 1CogKbm.spin2 file. The top object also loads the SmartSerial.spin and std_text_routines.spinh files that are packaged with Spin2gui.
The same as above, but loads a second 1CogKbM object to utilize both ports (A-lower/B-upper) of the Serial Host accessory board.
This is older code (three cogs) that outputs the contents of the various USB descriptors read at device enumeration. If you have a keyboard/mouse that is not recognized (or any other USB device) , the descriptor information may help when troubleshooting. Sometimes at cold startup, it may not detect a device when connected. If this happens, a reload of the code should get it going.
P2asm version of the one cog USBKbM demo.