libqiprog: Fix copypaste error in h_to_le32() (Trivial)

h_to_le32() takes in a uint32_t, not a uint16_t.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_host: Implement set_address()

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Add core implementation for readn()/writen()

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Style fixes (Trivial)

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Better document how to connect the driver to firmware

While the existing documentation was acceptable, it did not explain how to
connect the control request handler to firmware, leaving it as an exercise
to the reader. Add this missing documentation.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Be explicit no data is returned during a IN transactions

Be explicit when data is not returned in a control transaction. Some
stacks, including the libopencm3 stack may get confused when the 'len'
parameter of qiprog_handle_control_request() is not zeroed.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Hook qiprog_set_address to USB control requests

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>