hal_serial_usb.dox 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @defgroup SERIAL_USB Serial over USB Driver
  15. * @brief Serial over USB Driver.
  16. * @details This module implements an USB Communication Device Class
  17. * (CDC) as a normal serial communication port accessible from
  18. * the device application.
  19. * @pre In order to use the USB over Serial driver the
  20. * @p HAL_USE_SERIAL_USB option must be enabled in @p halconf.h.
  21. *
  22. * @section usb_serial_1 Driver State Machine
  23. * The driver implements a state machine internally, not all the driver
  24. * functionalities can be used in any moment, any transition not explicitly
  25. * shown in the following diagram has to be considered an error and shall
  26. * be captured by an assertion (if enabled).
  27. * @dot
  28. digraph example {
  29. rankdir="LR";
  30. node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true",
  31. width="0.9", height="0.9"];
  32. edge [fontname=Helvetica, fontsize=8];
  33. uninit [label="SDU_UNINIT", style="bold"];
  34. stop [label="SDU_STOP\nLow Power"];
  35. ready [label="SDU_READY\nClock Enabled"];
  36. uninit -> stop [label=" sduInit()"];
  37. stop -> stop [label="\nsduStop()"];
  38. stop -> ready [label="\nsduStart()"];
  39. ready -> stop [label="\nsduStop()"];
  40. ready -> ready [label="\nsduStart()"];
  41. ready -> ready [label="\nAny I/O operation"];
  42. }
  43. * @enddot
  44. *
  45. * @ingroup HAL_COMPLEX_DRIVERS
  46. */