Early days for this README, it's currently a dumping ground for notes.



Un-programmed Uphil shows up with Vendor ID 08a9, Product ID 0302.

  $ lsusb
  Bus 001 Device 045: ID 08a9:0302  

Program via load utilty, which squirts firmware at the specified device.

  $ ./load /dev/bus/usb/001/045
  stop CPU
  ... WROTE: 8192 bytes, 2 segments, avg 4096
  reset CPU
  
  Write successful!
  Sent 464752 bytes.
  
  Write successful!
  Sent 8196 bytes.
  stop CPU
  ... WROTE: 8192 bytes, 2 segments, avg 4096
  reset CPU

After this Uphil shows up with Vendor ID 04b4, Product ID 4717.

  $ lsusb
  Bus 001 Device 046: ID 04b4:4717 Cypress Semiconductor Corp.

At this point it's a working serial device, and the Linux kernel should have
loaded drivers for it and created a device node something like /dev/ttyACM0.

Unsurprisingly, tcsetattr() doesn't work: use AT commands or libusb.

The uphil bash script can be used to change Uphil settings via that device
node.

I've started collecting C code for interacting with Uphil for a reusable
library. At the time of this writing there's still a bunch to be moved here
but there's probably enough to show how the API works. I'm using libusb to
work with the USB device more directly, instead of sending AT comands through
the serial device node. A side effect I'm seeing is that the serial device
dissapears - I think because the the kernel driver is detached before the USB
interface is claimed but fails to reattach after the interface is released.
Might be permissions related. I haven't tried running as root yet.

There are some sample apps included under src/ - simple things, but it provide
an informative mix of using Uphils with either libusb or via standard Unix file
IO.
