0.3.1
|
Macros | |
#define | USB_CART_OUT_EP_SIZE 62 |
64-byte packet containing 62-byte payload. | |
Functions | |
static bool | usb_cart_rxf_full (void) |
Determine if the receive buffer is full. | |
static bool | usb_cart_txe_full (void) |
Determine if the transfer buffer is full. | |
static void | usb_cart_rxf_wait (void) |
Wait until the receive buffer is not full, but not necessarily empty. | |
static void | usb_cart_txe_wait (void) |
Wait until the transfer buffer is not full, but not necessarily empty. | |
static uint8_t | usb_cart_byte_read (void) |
Read a 8-bit value. | |
static void | usb_cart_byte_send (uint8_t c) |
Write an 8-bit value. | |
void | usb_cart_init (void) |
Initialize USB cart. | |
uint8_t | usb_cart_byte_xchg (uint8_t c) |
Reads an 8-bit value and writes an 8-bit value. | |
uint32_t | usb_cart_long_read (void) |
Read a 32-bit value. | |
void | usb_cart_long_send (uint32_t w) |
Write a 32-bit value. | |
void | usb_cart_dma_read (void *buffer, uint32_t len) |
Use DMA to read. | |
void | usb_cart_dma_send (const void *buffer, uint32_t len) |
Use DMA to write. | |
Description goes here.
|
inlinestatic |
Determine if the receive buffer is full.
When the RXF#
flag is low, this indicates there is still unread data in the internal receive buffer remaining to be read by the downstream FPGA or micro.
|
inlinestatic |
Determine if the transfer buffer is full.
When the TXE#
flag is low, this indicates there is enough internal transmit buffer space available for writing data back to the host.
|
inlinestatic |
Wait until the receive buffer is not full, but not necessarily empty.
When the RXF#
flag is low, this indicates there is still unread data in the internal receive buffer remaining to be read by the downstream FPGA or micro.
|
inlinestatic |
Wait until the transfer buffer is not full, but not necessarily empty.
When the TXE# flag is low, this indicates there is enough internal transmit buffer space available for writing data back to the host.
|
inlinestatic |
Read a 8-bit value.
Waits until the receive buffer has is non-empty.
|
inlinestatic |
Write an 8-bit value.
Waits until the transfer buffer is not full.
c | The 8-bit value to write. |
Reads an 8-bit value and writes an 8-bit value.
The function first waits until the receive buffer is non-empty, the reads a byte then stores the value.
The function then waits until the transfer buffer is not full to send a byte.
c | The 8-bit value to exchange. |
uint32_t usb_cart_long_read | ( | void | ) |
Read a 32-bit value.
Waits for the receive buffer to be non-empty on every byte.
void usb_cart_long_send | ( | uint32_t | w | ) |
Write a 32-bit value.
w | The 32-bit value. |
void usb_cart_dma_read | ( | void * | buffer, |
uint32_t | len | ||
) |
Use DMA to read.
This function is synchronous. CPU-DMAC is used to retrieve buffer in chunks of 62 bytes. Any remaining bytes are received byte per byte.
buffer | The buffer to write to. |
len | The size of buffer in bytes. |
void usb_cart_dma_send | ( | const void * | buffer, |
uint32_t | len | ||
) |
Use DMA to write.
This function is synchronous. CPU-DMAC is used to transfer in chunks of 62 bytes. Any remaining bytes are transferred byte per byte.
buffer | The buffer to transfer. |
len | The size of buffer in bytes. |