Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
Register : Device OUT Endpoint 9 Transfer Size Register - doeptsiz9

Description

The application must modify this register before enabling the endpoint. Once the endpoint is enabled using Endpoint Enable bit of the Device Endpoint-n Control registers (DIEPCTLn.EPEna/DOEPCTLn.EPEna), the core modifies this register. The application can only read this register once the core has cleared the Endpoint Enable bit.

Register Layout

Bits Access Reset Description
[18:0] RW 0x0 Transfer Size
[28:19] RW 0x0 Packet Count
[30:29] R 0x0 SETUP Packet Count
[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_DOEPTSIZ9_XFERSIZE_LSB   0
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_MSB   18
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_WIDTH   19
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_SET_MSK   0x0007ffff
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_CLR_MSK   0xfff80000
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_RESET   0x0
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_GET(value)   (((value) & 0x0007ffff) >> 0)
 
#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_SET(value)   (((value) << 0) & 0x0007ffff)
 

Field : Packet Count - pktcnt

Indicates the total number of USB packets that constitute the Transfer Size amount of data for endpoint 0.This field is decremented every time a packet (maximum size or short packet) is read from the RxFIFO.

Field Access Macros:

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_LSB   19
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_MSB   28
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_WIDTH   10
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_SET_MSK   0x1ff80000
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_CLR_MSK   0xe007ffff
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_RESET   0x0
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_GET(value)   (((value) & 0x1ff80000) >> 19)
 
#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_SET(value)   (((value) << 19) & 0x1ff80000)
 

Field : SETUP Packet Count - rxdpid

Applies to isochronous OUT endpoints only.This is the data PID received in the last packet for this endpoint. Use datax.

Applies to control OUT Endpoints only. Use packetx. This field specifies the number of back-to-back SETUP data packets the endpoint can receive.

Field Enumeration Values:

Enum Value Description
ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA0 0x0 DATA0
ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA2PKT1 0x1 DATA2 or 1 packet
ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA1PKT2 0x2 DATA1 or 2 packets
ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_MDATAPKT3 0x3 MDATA or 3 packets

Field Access Macros:

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA0   0x0
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA2PKT1   0x1
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA1PKT2   0x2
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_MDATAPKT3   0x3
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_LSB   29
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_MSB   30
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_WIDTH   2
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_SET_MSK   0x60000000
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_CLR_MSK   0x9fffffff
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_RESET   0x0
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_GET(value)   (((value) & 0x60000000) >> 29)
 
#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_SET(value)   (((value) << 29) & 0x60000000)
 

Data Structures

struct  ALT_USB_DEV_DOEPTSIZ9_s
 

Macros

#define ALT_USB_DEV_DOEPTSIZ9_OFST   0x430
 
#define ALT_USB_DEV_DOEPTSIZ9_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_DEV_DOEPTSIZ9_OFST))
 

Typedefs

typedef struct
ALT_USB_DEV_DOEPTSIZ9_s 
ALT_USB_DEV_DOEPTSIZ9_t
 

Data Structure Documentation

struct ALT_USB_DEV_DOEPTSIZ9_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_DOEPTSIZ9.

Data Fields
uint32_t xfersize: 19 Transfer Size
uint32_t pktcnt: 10 Packet Count
const uint32_t rxdpid: 2 SETUP Packet Count
uint32_t __pad0__: 1 UNDEFINED

Macro Definitions

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_LSB   0

The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_MSB   18

The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_WIDTH   19

The width in bits of the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_SET_MSK   0x0007ffff

The mask used to set the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field value.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_CLR_MSK   0xfff80000

The mask used to clear the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field value.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_RESET   0x0

The reset value of the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_GET (   value)    (((value) & 0x0007ffff) >> 0)

Extracts the ALT_USB_DEV_DOEPTSIZ9_XFERSIZE field value from a register.

#define ALT_USB_DEV_DOEPTSIZ9_XFERSIZE_SET (   value)    (((value) << 0) & 0x0007ffff)

Produces a ALT_USB_DEV_DOEPTSIZ9_XFERSIZE register field value suitable for setting the register.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_LSB   19

The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_MSB   28

The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_WIDTH   10

The width in bits of the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_SET_MSK   0x1ff80000

The mask used to set the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field value.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_CLR_MSK   0xe007ffff

The mask used to clear the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field value.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_RESET   0x0

The reset value of the ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_GET (   value)    (((value) & 0x1ff80000) >> 19)

Extracts the ALT_USB_DEV_DOEPTSIZ9_PKTCNT field value from a register.

#define ALT_USB_DEV_DOEPTSIZ9_PKTCNT_SET (   value)    (((value) << 19) & 0x1ff80000)

Produces a ALT_USB_DEV_DOEPTSIZ9_PKTCNT register field value suitable for setting the register.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA0   0x0

Enumerated value for register field ALT_USB_DEV_DOEPTSIZ9_RXDPID

DATA0

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA2PKT1   0x1

Enumerated value for register field ALT_USB_DEV_DOEPTSIZ9_RXDPID

DATA2 or 1 packet

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_DATA1PKT2   0x2

Enumerated value for register field ALT_USB_DEV_DOEPTSIZ9_RXDPID

DATA1 or 2 packets

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_E_MDATAPKT3   0x3

Enumerated value for register field ALT_USB_DEV_DOEPTSIZ9_RXDPID

MDATA or 3 packets

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_LSB   29

The Least Significant Bit (LSB) position of the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_MSB   30

The Most Significant Bit (MSB) position of the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_WIDTH   2

The width in bits of the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_SET_MSK   0x60000000

The mask used to set the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field value.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_CLR_MSK   0x9fffffff

The mask used to clear the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field value.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_RESET   0x0

The reset value of the ALT_USB_DEV_DOEPTSIZ9_RXDPID register field.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_GET (   value)    (((value) & 0x60000000) >> 29)

Extracts the ALT_USB_DEV_DOEPTSIZ9_RXDPID field value from a register.

#define ALT_USB_DEV_DOEPTSIZ9_RXDPID_SET (   value)    (((value) << 29) & 0x60000000)

Produces a ALT_USB_DEV_DOEPTSIZ9_RXDPID register field value suitable for setting the register.

#define ALT_USB_DEV_DOEPTSIZ9_OFST   0x430

The byte offset of the ALT_USB_DEV_DOEPTSIZ9 register from the beginning of the component.

#define ALT_USB_DEV_DOEPTSIZ9_ADDR (   base)    ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_DEV_DOEPTSIZ9_OFST))

The address of the ALT_USB_DEV_DOEPTSIZ9 register.

Typedef Documentation

The typedef declaration for register ALT_USB_DEV_DOEPTSIZ9.