unsigned char USBEndpointDescriptor_GetType(const USBEndpointDescriptor *endpoint) { return endpoint->bmAttributes & 0x3; }