Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
Register : Host Channel 7 Transfer Size Register - hctsiz7

Description

Buffer DMA Mode

Register Layout

Bits Access Reset Description
[18:0] RW 0x0 Transfer Size
[28:19] RW 0x0 Packet Count
[30:29] RW 0x0 PID
[31] RW 0x0 Do Ping

Field : Transfer Size - xfersize

for an OUT, this field is the number of data bytes the host sends during the transfer. for an IN, this field is the buffer size that the application has Reserved for the transfer. The application is expected to program this field as an integer multiple of the maximum packet size for IN transactions (periodic and non-periodic).The width of this counter is specified as 19 bits.

Field Access Macros:

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_LSB   0
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_MSB   18
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_WIDTH   19
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_SET_MSK   0x0007ffff
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_CLR_MSK   0xfff80000
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_RESET   0x0
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_GET(value)   (((value) & 0x0007ffff) >> 0)
 
#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_SET(value)   (((value) << 0) & 0x0007ffff)
 

Field : Packet Count - pktcnt

This field is programmed by the application with the expected number of packets to be transmitted (OUT) or received (IN). The host decrements this count on every successful transmission or reception of an OUT/IN packet. Once this count reaches zero, the application is interrupted to indicate normal completion. The width of this counter is specified as 10 bits.

Field Access Macros:

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_LSB   19
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_MSB   28
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_WIDTH   10
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_SET_MSK   0x1ff80000
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_CLR_MSK   0xe007ffff
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_RESET   0x0
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_GET(value)   (((value) & 0x1ff80000) >> 19)
 
#define ALT_USB_HOST_HCTSIZ7_PKTCNT_SET(value)   (((value) << 19) & 0x1ff80000)
 

Field : PID - pid

The application programs this field with the type of PID to use forthe initial transaction. The host maintains this field for the rest of the transfer.

Field Enumeration Values:

Enum Value Description
ALT_USB_HOST_HCTSIZ7_PID_E_DATA0 0x0 DATA0
ALT_USB_HOST_HCTSIZ7_PID_E_DATA2 0x1 DATA2
ALT_USB_HOST_HCTSIZ7_PID_E_DATA1 0x2 DATA1
ALT_USB_HOST_HCTSIZ7_PID_E_MDATA 0x3 MDATA (non-control)/SETUP (control)

Field Access Macros:

#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA0   0x0
 
#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA2   0x1
 
#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA1   0x2
 
#define ALT_USB_HOST_HCTSIZ7_PID_E_MDATA   0x3
 
#define ALT_USB_HOST_HCTSIZ7_PID_LSB   29
 
#define ALT_USB_HOST_HCTSIZ7_PID_MSB   30
 
#define ALT_USB_HOST_HCTSIZ7_PID_WIDTH   2
 
#define ALT_USB_HOST_HCTSIZ7_PID_SET_MSK   0x60000000
 
#define ALT_USB_HOST_HCTSIZ7_PID_CLR_MSK   0x9fffffff
 
#define ALT_USB_HOST_HCTSIZ7_PID_RESET   0x0
 
#define ALT_USB_HOST_HCTSIZ7_PID_GET(value)   (((value) & 0x60000000) >> 29)
 
#define ALT_USB_HOST_HCTSIZ7_PID_SET(value)   (((value) << 29) & 0x60000000)
 

Field : Do Ping - dopng

This bit is used only for OUT transfers.Setting this field to 1 directs the host to do PING protocol. Do not Set this bit for IN transfers. If this bit is set for IN transfers it disables the channel.

Field Enumeration Values:

Enum Value Description
ALT_USB_HOST_HCTSIZ7_DOPNG_E_NOPING 0x0 No ping protocol
ALT_USB_HOST_HCTSIZ7_DOPNG_E_PING 0x1 Ping protocol

Field Access Macros:

#define ALT_USB_HOST_HCTSIZ7_DOPNG_E_NOPING   0x0
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_E_PING   0x1
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_LSB   31
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_MSB   31
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_WIDTH   1
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_SET_MSK   0x80000000
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_CLR_MSK   0x7fffffff
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_RESET   0x0
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_GET(value)   (((value) & 0x80000000) >> 31)
 
#define ALT_USB_HOST_HCTSIZ7_DOPNG_SET(value)   (((value) << 31) & 0x80000000)
 

Data Structures

struct  ALT_USB_HOST_HCTSIZ7_s
 

Macros

#define ALT_USB_HOST_HCTSIZ7_OFST   0x1f0
 
#define ALT_USB_HOST_HCTSIZ7_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_HOST_HCTSIZ7_OFST))
 

Typedefs

typedef struct
ALT_USB_HOST_HCTSIZ7_s 
ALT_USB_HOST_HCTSIZ7_t
 

Data Structure Documentation

struct ALT_USB_HOST_HCTSIZ7_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_HOST_HCTSIZ7.

Data Fields
uint32_t xfersize: 19 Transfer Size
uint32_t pktcnt: 10 Packet Count
uint32_t pid: 2 PID
uint32_t dopng: 1 Do Ping

Macro Definitions

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_LSB   0

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

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_MSB   18

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

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_WIDTH   19

The width in bits of the ALT_USB_HOST_HCTSIZ7_XFERSIZE register field.

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_SET_MSK   0x0007ffff

The mask used to set the ALT_USB_HOST_HCTSIZ7_XFERSIZE register field value.

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_CLR_MSK   0xfff80000

The mask used to clear the ALT_USB_HOST_HCTSIZ7_XFERSIZE register field value.

#define ALT_USB_HOST_HCTSIZ7_XFERSIZE_RESET   0x0

The reset value of the ALT_USB_HOST_HCTSIZ7_XFERSIZE register field.

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

Extracts the ALT_USB_HOST_HCTSIZ7_XFERSIZE field value from a register.

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

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

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_LSB   19

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

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_MSB   28

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

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_WIDTH   10

The width in bits of the ALT_USB_HOST_HCTSIZ7_PKTCNT register field.

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_SET_MSK   0x1ff80000

The mask used to set the ALT_USB_HOST_HCTSIZ7_PKTCNT register field value.

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_CLR_MSK   0xe007ffff

The mask used to clear the ALT_USB_HOST_HCTSIZ7_PKTCNT register field value.

#define ALT_USB_HOST_HCTSIZ7_PKTCNT_RESET   0x0

The reset value of the ALT_USB_HOST_HCTSIZ7_PKTCNT register field.

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

Extracts the ALT_USB_HOST_HCTSIZ7_PKTCNT field value from a register.

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

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

#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA0   0x0

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_PID

DATA0

#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA2   0x1

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_PID

DATA2

#define ALT_USB_HOST_HCTSIZ7_PID_E_DATA1   0x2

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_PID

DATA1

#define ALT_USB_HOST_HCTSIZ7_PID_E_MDATA   0x3

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_PID

MDATA (non-control)/SETUP (control)

#define ALT_USB_HOST_HCTSIZ7_PID_LSB   29

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

#define ALT_USB_HOST_HCTSIZ7_PID_MSB   30

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

#define ALT_USB_HOST_HCTSIZ7_PID_WIDTH   2

The width in bits of the ALT_USB_HOST_HCTSIZ7_PID register field.

#define ALT_USB_HOST_HCTSIZ7_PID_SET_MSK   0x60000000

The mask used to set the ALT_USB_HOST_HCTSIZ7_PID register field value.

#define ALT_USB_HOST_HCTSIZ7_PID_CLR_MSK   0x9fffffff

The mask used to clear the ALT_USB_HOST_HCTSIZ7_PID register field value.

#define ALT_USB_HOST_HCTSIZ7_PID_RESET   0x0

The reset value of the ALT_USB_HOST_HCTSIZ7_PID register field.

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

Extracts the ALT_USB_HOST_HCTSIZ7_PID field value from a register.

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

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

#define ALT_USB_HOST_HCTSIZ7_DOPNG_E_NOPING   0x0

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_DOPNG

No ping protocol

#define ALT_USB_HOST_HCTSIZ7_DOPNG_E_PING   0x1

Enumerated value for register field ALT_USB_HOST_HCTSIZ7_DOPNG

Ping protocol

#define ALT_USB_HOST_HCTSIZ7_DOPNG_LSB   31

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

#define ALT_USB_HOST_HCTSIZ7_DOPNG_MSB   31

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

#define ALT_USB_HOST_HCTSIZ7_DOPNG_WIDTH   1

The width in bits of the ALT_USB_HOST_HCTSIZ7_DOPNG register field.

#define ALT_USB_HOST_HCTSIZ7_DOPNG_SET_MSK   0x80000000

The mask used to set the ALT_USB_HOST_HCTSIZ7_DOPNG register field value.

#define ALT_USB_HOST_HCTSIZ7_DOPNG_CLR_MSK   0x7fffffff

The mask used to clear the ALT_USB_HOST_HCTSIZ7_DOPNG register field value.

#define ALT_USB_HOST_HCTSIZ7_DOPNG_RESET   0x0

The reset value of the ALT_USB_HOST_HCTSIZ7_DOPNG register field.

#define ALT_USB_HOST_HCTSIZ7_DOPNG_GET (   value)    (((value) & 0x80000000) >> 31)

Extracts the ALT_USB_HOST_HCTSIZ7_DOPNG field value from a register.

#define ALT_USB_HOST_HCTSIZ7_DOPNG_SET (   value)    (((value) << 31) & 0x80000000)

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

#define ALT_USB_HOST_HCTSIZ7_OFST   0x1f0

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

#define ALT_USB_HOST_HCTSIZ7_ADDR (   base)    ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_USB_HOST_HCTSIZ7_OFST))

The address of the ALT_USB_HOST_HCTSIZ7 register.

Typedef Documentation

The typedef declaration for register ALT_USB_HOST_HCTSIZ7.