Dan
I don't use the example code but instead work with the uTasker USB stack. It will depend on the stack that you are using as to whether it can handle IN and OUT on a single endpoint since that is a design issue.
What I can do is tell you the implecations for the uTasker USB stack so that you can check the details in yours:
1. The configuration descriptor has to be build accordingly (either IN = 1, OUT = 2, or IN = OUT = 1, for example) - this is what you have already done.
2. When the endpoints are initialised there will be two initialisations for the same one (one for the IN function and one for the OUT function). The initialisation function must ensure that when it initialises for OUT operation it doesn't alter any IN settings (that may have aready been made), In the other sense, the initialisation function must ensure that when it initialises for IN operation it doesn't alter any OUT settings (that may have aready been made), [IN and OUT configuration ordering can theoretically be in any order].
3. For basic operation there is only need for service on data reception and so there should be no change needed for this. The buffer decriptors have two independent halves, one for IN and one for OUT and so code handling IN and OUTs should not in fact conflict in any way. Specifically in the uTasker stack there is a need for a task ownership to be assigned for the IN and OUT parts which is not needed when an endpoint is only either IN or OUT, in order for it to correctly wake the owner task on reception or when the output buffer (IN side) has space from new data ater the task was blocked due to lack of space. This single piece of extra information was the only one needed in this solution (in fact one single additional variable byte per endpoint object).
There may be more adjustment requirements in other cases if the design of IN and OUT handling (and the buffer descriptor accesses) have some (unnecessary or incorrect) overlaps that don't impact the pure IN or OUT case, but cause new problems when sharing. If there are such, the job to separate them correctly could be quite large and compicated. Hopefully the best case scenario proves to be true!
Regards
Mark