![]() |
Altera SoCAL
16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
|
The data bytes of CAN messages are stored in the IF1/2 registers in the following order. In a CAN Data Frame, Data(0) is the first, Data(7) is the last byte to be transmitted or received. In CAN's serial bit stream, the MSB of each byte will be transmitted first.
Register Layout
Bits | Access | Reset | Description |
---|---|---|---|
[7:0] | RW | 0x0 | Data 0 |
[15:8] | RW | 0x0 | Data 1 |
[23:16] | RW | 0x0 | Data 2 |
[31:24] | RW | 0x0 | Data 3 |
Field : Data 0 - Data0 | |
1st data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_LSB 0 |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_MSB 7 |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_SET_MSK 0x000000ff |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_CLR_MSK 0xffffff00 |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_GET(value) (((value) & 0x000000ff) >> 0) |
#define | ALT_CAN_MSGIF_IF2DA_DATA0_SET(value) (((value) << 0) & 0x000000ff) |
Field : Data 1 - Data1 | |
2nd data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_LSB 8 |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_MSB 15 |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_SET_MSK 0x0000ff00 |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_CLR_MSK 0xffff00ff |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_GET(value) (((value) & 0x0000ff00) >> 8) |
#define | ALT_CAN_MSGIF_IF2DA_DATA1_SET(value) (((value) << 8) & 0x0000ff00) |
Field : Data 2 - Data2 | |
3rd data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_LSB 16 |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_MSB 23 |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_SET_MSK 0x00ff0000 |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_CLR_MSK 0xff00ffff |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_GET(value) (((value) & 0x00ff0000) >> 16) |
#define | ALT_CAN_MSGIF_IF2DA_DATA2_SET(value) (((value) << 16) & 0x00ff0000) |
Field : Data 3 - Data3 | |
4th data byte of a CAN Data Frame Field Access Macros: | |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_LSB 24 |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_MSB 31 |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_WIDTH 8 |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_SET_MSK 0xff000000 |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_CLR_MSK 0x00ffffff |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_RESET 0x0 |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_GET(value) (((value) & 0xff000000) >> 24) |
#define | ALT_CAN_MSGIF_IF2DA_DATA3_SET(value) (((value) << 24) & 0xff000000) |
Data Structures | |
struct | ALT_CAN_MSGIF_IF2DA_s |
Macros | |
#define | ALT_CAN_MSGIF_IF2DA_OFST 0x30 |
#define | ALT_CAN_MSGIF_IF2DA_ADDR(base) ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_MSGIF_IF2DA_OFST)) |
Typedefs | |
typedef struct ALT_CAN_MSGIF_IF2DA_s | ALT_CAN_MSGIF_IF2DA_t |
struct ALT_CAN_MSGIF_IF2DA_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_CAN_MSGIF_IF2DA.
Data Fields | ||
---|---|---|
uint32_t | Data0: 8 | Data 0 |
uint32_t | Data1: 8 | Data 1 |
uint32_t | Data2: 8 | Data 2 |
uint32_t | Data3: 8 | Data 3 |
#define ALT_CAN_MSGIF_IF2DA_DATA0_LSB 0 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DA_DATA0 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA0_MSB 7 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DA_DATA0 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA0_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DA_DATA0 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA0_SET_MSK 0x000000ff |
The mask used to set the ALT_CAN_MSGIF_IF2DA_DATA0 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA0_CLR_MSK 0xffffff00 |
The mask used to clear the ALT_CAN_MSGIF_IF2DA_DATA0 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA0_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DA_DATA0 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA0_GET | ( | value | ) | (((value) & 0x000000ff) >> 0) |
Extracts the ALT_CAN_MSGIF_IF2DA_DATA0 field value from a register.
#define ALT_CAN_MSGIF_IF2DA_DATA0_SET | ( | value | ) | (((value) << 0) & 0x000000ff) |
Produces a ALT_CAN_MSGIF_IF2DA_DATA0 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DA_DATA1_LSB 8 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DA_DATA1 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA1_MSB 15 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DA_DATA1 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA1_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DA_DATA1 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA1_SET_MSK 0x0000ff00 |
The mask used to set the ALT_CAN_MSGIF_IF2DA_DATA1 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA1_CLR_MSK 0xffff00ff |
The mask used to clear the ALT_CAN_MSGIF_IF2DA_DATA1 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA1_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DA_DATA1 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA1_GET | ( | value | ) | (((value) & 0x0000ff00) >> 8) |
Extracts the ALT_CAN_MSGIF_IF2DA_DATA1 field value from a register.
#define ALT_CAN_MSGIF_IF2DA_DATA1_SET | ( | value | ) | (((value) << 8) & 0x0000ff00) |
Produces a ALT_CAN_MSGIF_IF2DA_DATA1 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DA_DATA2_LSB 16 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DA_DATA2 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA2_MSB 23 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DA_DATA2 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA2_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DA_DATA2 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA2_SET_MSK 0x00ff0000 |
The mask used to set the ALT_CAN_MSGIF_IF2DA_DATA2 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA2_CLR_MSK 0xff00ffff |
The mask used to clear the ALT_CAN_MSGIF_IF2DA_DATA2 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA2_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DA_DATA2 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA2_GET | ( | value | ) | (((value) & 0x00ff0000) >> 16) |
Extracts the ALT_CAN_MSGIF_IF2DA_DATA2 field value from a register.
#define ALT_CAN_MSGIF_IF2DA_DATA2_SET | ( | value | ) | (((value) << 16) & 0x00ff0000) |
Produces a ALT_CAN_MSGIF_IF2DA_DATA2 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DA_DATA3_LSB 24 |
The Least Significant Bit (LSB) position of the ALT_CAN_MSGIF_IF2DA_DATA3 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA3_MSB 31 |
The Most Significant Bit (MSB) position of the ALT_CAN_MSGIF_IF2DA_DATA3 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA3_WIDTH 8 |
The width in bits of the ALT_CAN_MSGIF_IF2DA_DATA3 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA3_SET_MSK 0xff000000 |
The mask used to set the ALT_CAN_MSGIF_IF2DA_DATA3 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA3_CLR_MSK 0x00ffffff |
The mask used to clear the ALT_CAN_MSGIF_IF2DA_DATA3 register field value.
#define ALT_CAN_MSGIF_IF2DA_DATA3_RESET 0x0 |
The reset value of the ALT_CAN_MSGIF_IF2DA_DATA3 register field.
#define ALT_CAN_MSGIF_IF2DA_DATA3_GET | ( | value | ) | (((value) & 0xff000000) >> 24) |
Extracts the ALT_CAN_MSGIF_IF2DA_DATA3 field value from a register.
#define ALT_CAN_MSGIF_IF2DA_DATA3_SET | ( | value | ) | (((value) << 24) & 0xff000000) |
Produces a ALT_CAN_MSGIF_IF2DA_DATA3 register field value suitable for setting the register.
#define ALT_CAN_MSGIF_IF2DA_OFST 0x30 |
The byte offset of the ALT_CAN_MSGIF_IF2DA register from the beginning of the component.
#define ALT_CAN_MSGIF_IF2DA_ADDR | ( | base | ) | ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_CAN_MSGIF_IF2DA_OFST)) |
The address of the ALT_CAN_MSGIF_IF2DA register.
typedef struct ALT_CAN_MSGIF_IF2DA_s ALT_CAN_MSGIF_IF2DA_t |
The typedef declaration for register ALT_CAN_MSGIF_IF2DA.