This makes `rx_buffer` and `tx_buffer` *pointers*
volatile in order to avoid caching them in a register.
The original notation meant "a pointer to a volatile value"
(equivalent of `volatile uint8_t *`). This resulted in
`while(rx_buffer[ep_num] != NULL) ;` loop to get stuck
forever, even though the IRQ handler set the `rx_buffer[ep_num] = NULL`.
Due to an error, we were double-advancing the FIFO buffer. The end
result was that the second half of most reads were getting ignored.
This wasn't found during earlier testing because only 64-byte buffers
were tested.
This corrects this error by avoiding double-advancing the buffer.
Signed-off-by: Sean Cross <sean@xobs.io>
When opening a USB port, we ensure the buffer is NULL and has
a length of 0.
Due to a mistake in specifying the endpoint type, we never actually
cleared the value when opening an IN endpoint. This patch fixes
the comparison when opening an IN endpoint.
This fixes issue #218.
Signed-off-by: Sean Cross <sean@xobs.io>
While Fomu is produced by Foosn, the actual name of the hardware
block is `valentyusb`. Rename the module to match that.
Signed-off-by: Sean Cross <sean@xobs.io>