USB: atmel_usba_udc: use helper functions to determine endpoint type and direction