C6748_StarterWare_1_20_03_03. Some doubt about the correctness of the USB FIFO defines in usb.h. The existing code:
#define USB_FIFO_SZ_8192 0x00000010 // Biju
#define USB_FIFO_SZ_8_DB 0x00000011 // 8 byte double buffered FIFO
// (occupying 16 bytes)
#define USB_FIFO_SZ_16_DB 0x00000012 // 16 byte double buffered FIFO
// (occupying 32 bytes)
#define USB_FIFO_SZ_32_DB 0x00000013 // 32 byte double buffered FIFO
// (occupying 64 bytes)
#define USB_FIFO_SZ_64_DB 0x00000014 // 64 byte double buffered FIFO
// (occupying 128 bytes)
#define USB_FIFO_SZ_128_DB 0x00000015 // 128 byte double buffered FIFO
// (occupying 256 bytes)
#define USB_FIFO_SZ_256_DB 0x00000016 // 256 byte double buffered FIFO
// (occupying 512 bytes)
#define USB_FIFO_SZ_512_DB 0x00000017 // 512 byte double buffered FIFO
// (occupying 1024 bytes)
#define USB_FIFO_SZ_1024_DB 0x00000018 // 1024 byte double buffered FIFO
// (occupying 2048 bytes)
#define USB_FIFO_SZ_2048_DB 0x00000019 // 2048 byte double buffered FIFO
// (occupying 4096 bytes)
#define USB_FIFO_SZ_4096_DB 0x00000020 //Biju
The value for 0x10 for 8192 should 0x0A. The values for the double buffering are all off by one. I think the correct defines should be:
#define USB_FIFO_SZ_8192 0x0000000A // Biju
#define USB_FIFO_SZ_8_DB 0x00000010 // 8 byte double buffered FIFO
// (occupying 16 bytes)
#define USB_FIFO_SZ_16_DB 0x00000011 // 16 byte double buffered FIFO
// (occupying 32 bytes)
#define USB_FIFO_SZ_32_DB 0x00000012 // 32 byte double buffered FIFO
// (occupying 64 bytes)
#define USB_FIFO_SZ_64_DB 0x00000013 // 64 byte double buffered FIFO
// (occupying 128 bytes)
#define USB_FIFO_SZ_128_DB 0x00000014 // 128 byte double buffered FIFO
// (occupying 256 bytes)
#define USB_FIFO_SZ_256_DB 0x00000015 // 256 byte double buffered FIFO
// (occupying 512 bytes)
#define USB_FIFO_SZ_512_DB 0x00000016 // 512 byte double buffered FIFO
// (occupying 1024 bytes)
#define USB_FIFO_SZ_1024_DB 0x00000017 // 1024 byte double buffered FIFO
// (occupying 2048 bytes)
#define USB_FIFO_SZ_2048_DB 0x00000018 // 2048 byte double buffered FIFO
// (occupying 4096 bytes)
#define USB_FIFO_SZ_4096_DB 0x00000019 //Biju
Questionable whether these defines should exist at all. They are used primarily as parameters to the USB_FIFO_SZ_TO_BYTES() macro. Why not just use the resultant values 8, 16, 32, ...?