Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
Register : Card Type Register - ctype

Description

Describes card formats.

Register Layout

Bits Access Reset Description
[0] RW 0x0 Card Width 1 or 4 Bits
[15:1] ??? 0x0 UNDEFINED
[16] RW 0x0 Card Width 8 Bit
[31:17] ??? 0x0 UNDEFINED

Field : Card Width 1 or 4 Bits - card_width2

Ignored if card_width1 is MODE8BIT.

Field Enumeration Values:

Enum Value Description
ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD1BIT 0x0 1-bit mode
ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD4BIT 0x1 4-bit mode

Field Access Macros:

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD1BIT   0x0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD4BIT   0x1
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_LSB   0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_MSB   0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_WIDTH   1
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_SET_MSK   0x00000001
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_CLR_MSK   0xfffffffe
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_RESET   0x0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_GET(value)   (((value) & 0x00000001) >> 0)
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH2_SET(value)   (((value) << 0) & 0x00000001)
 

Field : Card Width 8 Bit - card_width1

Indicates if card is 8 bit or othersize. If not 8-bit, card_width2 specifies the width.

Field Enumeration Values:

Enum Value Description
ALT_SDMMC_CTYPE_CARD_WIDTH1_E_NON8BIT 0x0 Non 8-bit mode
ALT_SDMMC_CTYPE_CARD_WIDTH1_E_MOD8BIT 0x1 8-bit mode

Field Access Macros:

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_E_NON8BIT   0x0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_E_MOD8BIT   0x1
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_LSB   16
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_MSB   16
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_WIDTH   1
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_SET_MSK   0x00010000
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_CLR_MSK   0xfffeffff
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_RESET   0x0
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_GET(value)   (((value) & 0x00010000) >> 16)
 
#define ALT_SDMMC_CTYPE_CARD_WIDTH1_SET(value)   (((value) << 16) & 0x00010000)
 

Data Structures

struct  ALT_SDMMC_CTYPE_s
 

Macros

#define ALT_SDMMC_CTYPE_OFST   0x18
 

Typedefs

typedef struct ALT_SDMMC_CTYPE_s ALT_SDMMC_CTYPE_t
 

Data Structure Documentation

struct ALT_SDMMC_CTYPE_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_SDMMC_CTYPE.

Data Fields
uint32_t card_width2: 1 Card Width 1 or 4 Bits
uint32_t __pad0__: 15 UNDEFINED
uint32_t card_width1: 1 Card Width 8 Bit
uint32_t __pad1__: 15 UNDEFINED

Macro Definitions

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD1BIT   0x0

Enumerated value for register field ALT_SDMMC_CTYPE_CARD_WIDTH2

1-bit mode

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_E_MOD4BIT   0x1

Enumerated value for register field ALT_SDMMC_CTYPE_CARD_WIDTH2

4-bit mode

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_LSB   0

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

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_MSB   0

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

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_WIDTH   1

The width in bits of the ALT_SDMMC_CTYPE_CARD_WIDTH2 register field.

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_SET_MSK   0x00000001

The mask used to set the ALT_SDMMC_CTYPE_CARD_WIDTH2 register field value.

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_CLR_MSK   0xfffffffe

The mask used to clear the ALT_SDMMC_CTYPE_CARD_WIDTH2 register field value.

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_RESET   0x0

The reset value of the ALT_SDMMC_CTYPE_CARD_WIDTH2 register field.

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_GET (   value)    (((value) & 0x00000001) >> 0)

Extracts the ALT_SDMMC_CTYPE_CARD_WIDTH2 field value from a register.

#define ALT_SDMMC_CTYPE_CARD_WIDTH2_SET (   value)    (((value) << 0) & 0x00000001)

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

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_E_NON8BIT   0x0

Enumerated value for register field ALT_SDMMC_CTYPE_CARD_WIDTH1

Non 8-bit mode

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_E_MOD8BIT   0x1

Enumerated value for register field ALT_SDMMC_CTYPE_CARD_WIDTH1

8-bit mode

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_LSB   16

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

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_MSB   16

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

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_WIDTH   1

The width in bits of the ALT_SDMMC_CTYPE_CARD_WIDTH1 register field.

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_SET_MSK   0x00010000

The mask used to set the ALT_SDMMC_CTYPE_CARD_WIDTH1 register field value.

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_CLR_MSK   0xfffeffff

The mask used to clear the ALT_SDMMC_CTYPE_CARD_WIDTH1 register field value.

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_RESET   0x0

The reset value of the ALT_SDMMC_CTYPE_CARD_WIDTH1 register field.

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_GET (   value)    (((value) & 0x00010000) >> 16)

Extracts the ALT_SDMMC_CTYPE_CARD_WIDTH1 field value from a register.

#define ALT_SDMMC_CTYPE_CARD_WIDTH1_SET (   value)    (((value) << 16) & 0x00010000)

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

#define ALT_SDMMC_CTYPE_OFST   0x18

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

Typedef Documentation

The typedef declaration for register ALT_SDMMC_CTYPE.