Patent ID: 6816929
Filing Date: 2004-11-09
Classification: G06F

Abstract:
A data transfer control method applicable to a peripheral device that performs data communications with a host by using a plurality of endpoints via a universal serial bus interface, comprising the steps of:determining assignments for memories to be used as function-specified buffers and at least one common buffer that are adequately allocated to the plurality of endpoints respectively; upon receipt of a token from the host, automatically determining a first endpoint for performing data transfer in response to the token within the plurality of endpoints; if the common buffer is previously allocated to the first endpoint, actualizing a double buffer configuration for the first endpoint by using the function-specified buffer and the common buffer, so that the first endpoint proceeds to the data transfer in response to the token; if the common buffer is not previously allocated to the first endpoint but is allocated to a second endpoint within the plurality of endpoints so that the second endpoint actualizes a double buffer configuration by using the function-specified buffer and the common buffer, making a decision as to whether the function-specified buffer or the common buffer for use in the second endpoint becomes vacant so as to determine a vacant buffer from among them; automatically allocating the vacant buffer of the second endpoint as a new common buffer to the first endpoint, which in turn actualizes a double buffer configuration by using the function-specified buffer and the new common buffer, thus performing the data transfer in response to the token; and if a read buffer of the second endpoint corresponding to one of the function-specified buffer and the common buffer is not vacant, controlling the first endpoint to perform the data transfer using the function-specified buffer in response to the token.