摘要 |
A data transfer method is utilized for saving memory for storing packet in USB protocol. When a transmitter is to send a payload, the protocol layer of the transmitter writes the payload into a shared payload memory. The protocol layer generates a corresponding header according to the payload, and writes the corresponding header into a shared header memory. The data-link layer of the transmitter generates a packet by means of directly combining the payload saving in the shared payload memory and the header saving in the shared header memory, and sends the packet. Hence, when the transmitter is to send the payload, the transmitter only requires a memory of which the size is equal to a packet. In this way, the memory can be saved, reducing the cost.
|