4.4.15.3.1 ConvertEndpointSizeToMask()

RETURN_CODE_t ConvertEndpointSizeToMask (uint16_t endpointSize, USB_ENDPOINT_t endpointType, uint8_t * endpointMaskPtr)

Converts an endpoint size in number of bytes into a register setting. Converts the endpoint size bit mask based on the EP_BUFSIZE setting of the endpoint control register.

Parameters:
endpointSize

- The size to convert

endpointType

- The endpoint type

endpointMaskPtr

- Pointer to the mask variable to write to

Returns:

SUCCESS or an Error code according to RETURN_CODE_t