Quote from the ch554 English datasheed:
Note: the length of the buffer that receives data >= min (maximum data packet length possibly received + 2 bytes, 64 bytes)
I am still not shure if I understand that correctly.
An example:
#define EP0_SIZE 0x08
uint8_t xdata EP0Buffer[EP0_SIZE +2]? _at_ 0x0000;//8 byte buffer for EP0 to save memory
//gap may be used by the linker
uint8_t xdata EP2Buffer[2*BULK_SIZE] _at_ 0x0080;
EP0 shares the buffer beetween IN & OUT. Should i reserve 2 more Bytes for that buffer?
For EP1..3 it can happen that 2 bytes of EPxInBuffer will be destroyed. But that does not seem a problem. EP4 i never used up to now.
Is it save to use #define EP0_SIZE 0x08 to use just a 10 byte Buffer for DMA0 or should i alway declare 0x40 even when I plan just to use 8Bytes for the control transfers?