volatile BDT_ENTRY BDT[BDT_NUM_ENTRIES] BDT_BASE_ADDR_TAG;
here are some defination.
upto this, it is ok.
but here,
volatile BDT_ENTRY BDT[BDT_NUM_ENTRIES] BDT_BASE_ADDR_TAG;
it shows three part BDT_ENTRY is typedef of union and BDT[BDT_NUM_ENTRIES] is array of BDT_ENTRY.
This is also ok but again there is third part of BDT_BASE_ADDR_TAG.
what is doing here???
is it for address??
that is to locate this variable at that position??
here are some defination.
Rich (BB code):
#define BDT_NUM_ENTRIES ((USB_MAX_EP_NUMBER + 1) * 4)
#define USB_MAX_EP_NUMBER 2
#define BDT_BASE_ADDR 0x2000
#define BDT_BASE_ADDR_TAG @ BDT_BASE_ADDR
typedef union __BDT
{
struct
{
BD_STAT STAT;
BYTE CNT;
BYTE ADRL; //Buffer Address Low
BYTE ADRH; //Buffer Address High
};
struct
{
unsigned filler1:8;
unsigned filler2:8;
WORD ADR; //Buffer Address
};
DWORD Val;
BYTE v[4];
} BDT_ENTRY;
but here,
volatile BDT_ENTRY BDT[BDT_NUM_ENTRIES] BDT_BASE_ADDR_TAG;
it shows three part BDT_ENTRY is typedef of union and BDT[BDT_NUM_ENTRIES] is array of BDT_ENTRY.
This is also ok but again there is third part of BDT_BASE_ADDR_TAG.
what is doing here???
is it for address??
that is to locate this variable at that position??