aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/dox/hal_serial.dox
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/dox/hal_serial.dox')
-rw-r--r--os/hal/dox/hal_serial.dox57
1 files changed, 57 insertions, 0 deletions
diff --git a/os/hal/dox/hal_serial.dox b/os/hal/dox/hal_serial.dox
new file mode 100644
index 000000000..9acb0bccb
--- /dev/null
+++ b/os/hal/dox/hal_serial.dox
@@ -0,0 +1,57 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @defgroup SERIAL Serial Driver
+ * @brief Generic Serial Driver.
+ * @details This module implements a generic full duplex serial driver. The
+ * driver implements a @p SerialDriver interface and uses I/O Queues
+ * for communication between the upper and the lower driver. Event
+ * flags are used to notify the application about incoming data,
+ * outgoing data and other I/O events.<br>
+ * The module also contains functions that make the implementation
+ * of the interrupt service routines much easier.
+ * @pre In order to use the SERIAL driver the @p HAL_USE_SERIAL option
+ * must be enabled in @p halconf.h.
+ *
+ *
+ * @section serial_1 Driver State Machine
+ * The driver implements a state machine internally, not all the driver
+ * functionalities can be used in any moment, any transition not explicitly
+ * shown in the following diagram has to be considered an error and shall
+ * be captured by an assertion (if enabled).
+ * @dot
+ digraph example {
+ rankdir="LR";
+ node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true",
+ width="0.9", height="0.9"];
+ edge [fontname=Helvetica, fontsize=8];
+
+ uninit [label="SD_UNINIT", style="bold"];
+ stop [label="SD_STOP\nLow Power"];
+ ready [label="SD_READY\nClock Enabled"];
+
+ uninit -> stop [label=" sdInit()"];
+ stop -> stop [label="\nsdStop()"];
+ stop -> ready [label="\nsdStart()"];
+ ready -> stop [label="\nsdStop()"];
+ ready -> ready [label="\nsdStart()"];
+ ready -> ready [label="\nAny I/O operation"];
+ }
+ * @enddot
+ *
+ * @ingroup HAL_NORMAL_DRIVERS
+ */