[][src]Module fomu_pac::usb

USB

Modules

address

Sets the USB device address, in order to ignore packets going to other devices on the bus. This value is reset when the host issues a USB Device Reset condition.

in_ctrl

Enables transmission of data in response to IN tokens, or resets the contents of the FIFO.

in_data

Each byte written into this register gets added to an outgoing FIFO. Any bytes that are written here will be transmitted in the order in which they were added. The FIFO queue is automatically advanced with each write. The FIFO queue is 64 bytes deep. If you exceed this amount, the result is undefined.

in_ev_enable
in_ev_pending
in_ev_status
in_status

Status about the IN handler. As soon as you write to IN_DATA, IN_STATUS.HAVE should go to 1.

next_ev

In eptri, there are three endpoints. It is possible for an IRQ to fire and have all three bits set. Under these circumstances it can be difficult to know which event to process first. Use this register to determine which event needs to be processed first. Only one bit will ever be set at a time.

out_ctrl

Controls for receiving packet data. To enable an endpoint, write its value to epno, with the enable bit set to 1 to enable an endpoint, or 0 to disable it. Resetting the OutHandler will set all enable bits to 0. Similarly, you can adjust the STALL state by setting or clearing the stall bit.

out_data

Data received from the host will go into a FIFO. This register reflects the contents of the top byte in that FIFO. Reading from this register advances the FIFO pointer.

out_ev_enable
out_ev_pending
out_ev_status
out_status

Status about the current state of the OUT endpoint.

pullup_out
setup_ctrl

Controls for managing how to handle SETUP transactions.

setup_data

Data from the last SETUP transactions. It will be 10 bytes long, because it will include the CRC16. This is a FIFO, and the queue is advanced automatically.

setup_ev_enable
setup_ev_pending
setup_ev_status
setup_status

Status about the most recent SETUP transactions, and the state of the FIFO.

Structs

RegisterBlock

Register block

Type Definitions

ADDRESS

Sets the USB device address, in order to ignore packets going to other devices on the bus. This value is reset when the host issues a USB Device Reset condition.

IN_CTRL

Enables transmission of data in response to IN tokens, or resets the contents of the FIFO.

IN_DATA

Each byte written into this register gets added to an outgoing FIFO. Any bytes that are written here will be transmitted in the order in which they were added. The FIFO queue is automatically advanced with each write. The FIFO queue is 64 bytes deep. If you exceed this amount, the result is undefined.

IN_EV_ENABLE

This register you can read, reset, write, write_with_zero, modify. See API.

IN_EV_PENDING

This register you can read, reset, write, write_with_zero, modify. See API.

IN_EV_STATUS

This register you can read, reset, write, write_with_zero, modify. See API.

IN_STATUS

Status about the IN handler. As soon as you write to IN_DATA, IN_STATUS.HAVE should go to 1.

NEXT_EV

In eptri, there are three endpoints. It is possible for an IRQ to fire and have all three bits set. Under these circumstances it can be difficult to know which event to process first. Use this register to determine which event needs to be processed first. Only one bit will ever be set at a time.

OUT_CTRL

Controls for receiving packet data. To enable an endpoint, write its value to epno, with the enable bit set to 1 to enable an endpoint, or 0 to disable it. Resetting the OutHandler will set all enable bits to 0. Similarly, you can adjust the STALL state by setting or clearing the stall bit.

OUT_DATA

Data received from the host will go into a FIFO. This register reflects the contents of the top byte in that FIFO. Reading from this register advances the FIFO pointer.

OUT_EV_ENABLE

This register you can read, reset, write, write_with_zero, modify. See API.

OUT_EV_PENDING

This register you can read, reset, write, write_with_zero, modify. See API.

OUT_EV_STATUS

This register you can read, reset, write, write_with_zero, modify. See API.

OUT_STATUS

Status about the current state of the OUT endpoint.

PULLUP_OUT

This register you can read, reset, write, write_with_zero, modify. See API.

SETUP_CTRL

Controls for managing how to handle SETUP transactions.

SETUP_DATA

Data from the last SETUP transactions. It will be 10 bytes long, because it will include the CRC16. This is a FIFO, and the queue is advanced automatically.

SETUP_EV_ENABLE

This register you can read, reset, write, write_with_zero, modify. See API.

SETUP_EV_PENDING

This register you can read, reset, write, write_with_zero, modify. See API.

SETUP_EV_STATUS

This register you can read, reset, write, write_with_zero, modify. See API.

SETUP_STATUS

Status about the most recent SETUP transactions, and the state of the FIFO.