f4-discovery usb_cdcacm cleanup
Some samples are slightly rough around the corners. I think they can be made a little bit more self-descriptive. Here's clean up of f4-discovery usb_cdcacm sample. Things modified:
- Named endpoints
- Named result codes
- Data buffer made static instead of allocated on stack
- Used sizeof-based values where possible
The general problem with something like this is that it results in the examples being different. They really need to be more common, not diverging with this cdcacm example being completely different from the others.
@karlp I cannot really update all examples because I do not own every possible supported board/arch. Or rather, I can - why not, I just cannot verify the changes in that case.
Examples are already different enough. Example: not sure what this line does here and I'm pretty sure it's wrong: https://github.com/libopencm3/libopencm3-examples/blob/master/examples/stm32/f3/stm32f3-discovery/usb_cdcacm/cdcacm.c#L215