![]() |
Altera SoCAL
16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
|
The application must modify this register before enabling endpoint 0. Once endpoint 0 is enabled using Endpoint Enable bit of the Device Control Endpoint 0 Control registers (DIEPCTL0.EPEna/DOEPCTL0.EPEna), the core modifies this register. The application can only read this register once the core has cleared the Endpoint Enable bit. Nonzero endpoints use the registers for endpoints 1 to
Register Layout
Bits | Access | Reset | Description |
---|---|---|---|
[6:0] | RW | 0x0 | Transfer Size |
[18:7] | ??? | 0x0 | UNDEFINED |
[19] | RW | 0x0 | Packet Count |
[28:20] | ??? | 0x0 | UNDEFINED |
[30:29] | RW | 0x0 | ALT_USB_DEV_DOEPTSIZ0_SUPCNT |
[31] | ??? | 0x0 | UNDEFINED |
Field : Transfer Size - xfersize | |
Indicates the transfer size in bytes for endpoint 0. The core interrupts the application only after it has exhausted the transfer size amount of data. The transfer size can be Set to the maximum packet size of the endpoint, to be interrupted at the end of each packet. The core decrements this field every time a packet from the external memory is written to the RxFIFO. Field Access Macros: | |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_LSB 0 |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_MSB 6 |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_WIDTH 7 |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_SET_MSK 0x0000007f |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_CLR_MSK 0xffffff80 |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_RESET 0x0 |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_GET(value) (((value) & 0x0000007f) >> 0) |
#define | ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_SET(value) (((value) << 0) & 0x0000007f) |
Field : Packet Count - pktcnt | |
This field is decremented to zero after a packet is written into the RxFIFO. Field Access Macros: | |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_LSB 19 |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_MSB 19 |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_WIDTH 1 |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_SET_MSK 0x00080000 |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_CLR_MSK 0xfff7ffff |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_RESET 0x0 |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_GET(value) (((value) & 0x00080000) >> 19) |
#define | ALT_USB_DEV_DOEPTSIZ0_PKTCNT_SET(value) (((value) << 19) & 0x00080000) |
Field : supcnt | |||||||||||||
SETUP Packet Count (SUPCnt)This field specifies the number of back-to-back SETUP datapackets the endpoint can receive. Field Enumeration Values:
Field Access Macros: | |||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_ONEPKT 0x1 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_TWOPKT 0x2 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_THREEPKT 0x3 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_LSB 29 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_MSB 30 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_WIDTH 2 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_SET_MSK 0x60000000 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_CLR_MSK 0x9fffffff | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_RESET 0x0 | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_GET(value) (((value) & 0x60000000) >> 29) | ||||||||||||
#define | ALT_USB_DEV_DOEPTSIZ0_SUPCNT_SET(value) (((value) << 29) & 0x60000000) | ||||||||||||
Data Structures | |
struct | ALT_USB_DEV_DOEPTSIZ0_s |
Macros | |
#define | ALT_USB_DEV_DOEPTSIZ0_OFST 0x310 |
#define | ALT_USB_DEV_DOEPTSIZ0_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_DEV_DOEPTSIZ0_OFST)) |
Typedefs | |
typedef struct ALT_USB_DEV_DOEPTSIZ0_s | ALT_USB_DEV_DOEPTSIZ0_t |
struct ALT_USB_DEV_DOEPTSIZ0_s |
WARNING: The C register and register group struct declarations are provided for convenience and illustrative purposes. They should, however, be used with caution as the C language standard provides no guarantees about the alignment or atomicity of device memory accesses. The recommended practice for writing hardware drivers is to use the SoCAL access macros and alt_read_word() and alt_write_word() functions.
The struct declaration for register ALT_USB_DEV_DOEPTSIZ0.
Data Fields | ||
---|---|---|
uint32_t | xfersize: 7 | Transfer Size |
uint32_t | __pad0__: 12 | UNDEFINED |
uint32_t | pktcnt: 1 | Packet Count |
uint32_t | __pad1__: 9 | UNDEFINED |
uint32_t | supcnt: 2 | ALT_USB_DEV_DOEPTSIZ0_SUPCNT |
uint32_t | __pad2__: 1 | UNDEFINED |
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_LSB 0 |
The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_MSB 6 |
The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_WIDTH 7 |
The width in bits of the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_SET_MSK 0x0000007f |
The mask used to set the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field value.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_CLR_MSK 0xffffff80 |
The mask used to clear the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field value.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_RESET 0x0 |
The reset value of the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_GET | ( | value | ) | (((value) & 0x0000007f) >> 0) |
Extracts the ALT_USB_DEV_DOEPTSIZ0_XFERSIZE field value from a register.
#define ALT_USB_DEV_DOEPTSIZ0_XFERSIZE_SET | ( | value | ) | (((value) << 0) & 0x0000007f) |
Produces a ALT_USB_DEV_DOEPTSIZ0_XFERSIZE register field value suitable for setting the register.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_LSB 19 |
The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_MSB 19 |
The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_WIDTH 1 |
The width in bits of the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_SET_MSK 0x00080000 |
The mask used to set the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field value.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_CLR_MSK 0xfff7ffff |
The mask used to clear the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field value.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_RESET 0x0 |
The reset value of the ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_GET | ( | value | ) | (((value) & 0x00080000) >> 19) |
Extracts the ALT_USB_DEV_DOEPTSIZ0_PKTCNT field value from a register.
#define ALT_USB_DEV_DOEPTSIZ0_PKTCNT_SET | ( | value | ) | (((value) << 19) & 0x00080000) |
Produces a ALT_USB_DEV_DOEPTSIZ0_PKTCNT register field value suitable for setting the register.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_ONEPKT 0x1 |
Enumerated value for register field ALT_USB_DEV_DOEPTSIZ0_SUPCNT
1 packet
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_TWOPKT 0x2 |
Enumerated value for register field ALT_USB_DEV_DOEPTSIZ0_SUPCNT
2 packets
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_E_THREEPKT 0x3 |
Enumerated value for register field ALT_USB_DEV_DOEPTSIZ0_SUPCNT
3 packets
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_LSB 29 |
The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_MSB 30 |
The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_WIDTH 2 |
The width in bits of the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_SET_MSK 0x60000000 |
The mask used to set the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field value.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_CLR_MSK 0x9fffffff |
The mask used to clear the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field value.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_RESET 0x0 |
The reset value of the ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_GET | ( | value | ) | (((value) & 0x60000000) >> 29) |
Extracts the ALT_USB_DEV_DOEPTSIZ0_SUPCNT field value from a register.
#define ALT_USB_DEV_DOEPTSIZ0_SUPCNT_SET | ( | value | ) | (((value) << 29) & 0x60000000) |
Produces a ALT_USB_DEV_DOEPTSIZ0_SUPCNT register field value suitable for setting the register.
#define ALT_USB_DEV_DOEPTSIZ0_OFST 0x310 |
The byte offset of the ALT_USB_DEV_DOEPTSIZ0 register from the beginning of the component.
#define ALT_USB_DEV_DOEPTSIZ0_ADDR | ( | base | ) | ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_DEV_DOEPTSIZ0_OFST)) |
The address of the ALT_USB_DEV_DOEPTSIZ0 register.
typedef struct ALT_USB_DEV_DOEPTSIZ0_s ALT_USB_DEV_DOEPTSIZ0_t |
The typedef declaration for register ALT_USB_DEV_DOEPTSIZ0.