AN2294 Freescale Semiconductor / Motorola, AN2294 Datasheet - Page 11

no-image

AN2294

Manufacturer Part Number
AN2294
Description
MC68SZ328 USB Configuration Setup Application Note
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
//Setup information that will go into the EndPtBufs register
static unsigned char epcfg[NUM_ENDPOINT][5] = { { 0x00,0x00,0x08,0x00,0x00 },
{
// setup information into DDAT register byte for byte
}
Figure 9 represents the EndPBufs register with the appropriate register numbers as they should be
programmed into the UDC. Table 4 provides the register descriptions.
MOTOROLA
[39:36]
[35:34]
[33:32]
Bit Field
31
15
TRXTYP
AltSetting
EpNum
Config
Interface
30
14
int i,ep;
for (ep = 0; ep < NUM_ENDPOINT; ep++)
{
}
while (USB_CFGSTAT & 0x80000000);
return( TRUE )
Type
Code Example 2. Programming EndptBufs via the USB_DDAT
29
13
for (i = 0; i < 5; i++)
{
}
Freescale Semiconductor, Inc.
Table 4. EndPBufs Register Description Table
28
12
Logical endpoint number
Configuration number—Maximum up to 1 configurations.
Interface number—Maximum up to 1 interface.
For More Information On This Product,
Type
USB UDC Endpoint Buffers Format
USB_DDAT = epcfg[ep][i];
while( USB_CFGSTAT & 0x40000000);
27
11
Figure 9. EndPBufs Register
MC68SZ328 Application Note
Go to: www.freescale.com
Dir
26
10
25
9
Reserved
24
8
{ 0x14,0x10,0x10,0xC0,0x01 },
{ 0x24,0x14,0x10,0xC0,0x02 },
{ 0x34,0x10,0x40,0xC0,0x03 },
{ 0x44,0x14,0x40,0xC0,0x04 } };
39
23
7
Description
38
22
6
EpNum
MaxPktSize
37
21
5
36
20
4
35
19
3
Config
Software Interface
34
18
2
FifoNum
33
17
Interface
1
32
16
0
11

Related parts for AN2294