I'm working with some code that sets up USB communications on an Atmega32u4. According to the specs, that has "six" endpoints. Studying existing code and USB descriptor tables, it appears that at least some things working on some USB chips will use the same "endpoint number" for both input and output, except that one of them has a direction bit masked in. (So, for instance, you might have 0x02 and 0x82, where 0x80 is ENDPOINT_DIR_IN.)
This seems to work on at least some hardware.
What I can't figure out from any of the specs I've read is: When they say "six programmable endpoints", does having two endpoints in the USB device report, one on 0x02 and one on 0x82, count as two of the six endpoints? Will it work as-expected? The endpoint configuration register stuff is confusing to me and I have not yet understood how it's supposed to work.