diff --git a/os/io/hal.dox b/os/io/hal.dox index ea90d8ff6..77dc49a46 100644 --- a/os/io/hal.dox +++ b/os/io/hal.dox @@ -18,13 +18,11 @@ */ /** - * @defgroup IO I/O - * @brief I/O related services. - * @details This section contains the I/O related services. - * - * The I/O subsystem is a collection of device driver portable interfaces and - * platform dependent implementations.
- * Under ChibiOS/RT a device driver is split in two layers: + * @defgroup IO HAL + * @brief Hardware Abstraction Layer. + * @details Under ChibiOS/RT the set of the various device driver interfaces + * is called the HAL subsystem: Hardware Abstraction Layer.
+ * A device driver is usually split in two layers: * - High Level Device Driver (HLD). This layer contains the definitions * of the driver's APIs and the platform independent part of the driver.
* An HLD is composed by two files: @@ -41,21 +39,50 @@ * - @_lld.h, the high level header file. This file is implicitly * included by the HLD header file. * . + * The LLD may be not present in those drivers that do not access the + * hardware directly but through other device drivers, as example the + * @ref MMC_SPI driver uses the @ref SPI and @ref PAL drivers in order + * to implement its functionalities. * . *

Available Device Drivers

* The I/O subsystem currently includes support for: + * - @ref HAL. * - @ref PAL. * - @ref SERIAL. - * - @ref SPI. * - @ref ADC. + * - @ref CAN. * - @ref MAC. * - @ref MII. * - @ref MMC_SPI. + * - @ref SPI. * . */ /** - * @defgroup PAL Ports Abstraction Layer (PAL) + * @defgroup HAL HAL Driver + * @brief Hardware Abstraction Layer. + * @details The HAL driver performs the system initialization and includes + * the platform support code shared by the other drivers. + * + * @ingroup IO + */ + +/** + * @defgroup HAL_LLD HAL Low Level Driver + * @brief @ref HAL low level driver template. + * + * @ingroup HAL + */ + +/** + * @defgroup HAL_CONF Configuration + * @brief @ref HAL Configuration. + * + * @ingroup HAL + */ + +/** + * @defgroup PAL PAL Driver * @brief I/O Ports Abstraction Layer * @details This module defines an abstract interface for digital I/O ports. * Note that most I/O ports functions are just macros. The macros @@ -191,20 +218,26 @@ * @dot digraph example { rankdir="LR"; - node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"]; + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.8", height="0.8"]; edge [fontname=Helvetica, fontsize=8]; uninit [label="ADC_UNINIT", style="bold"]; stop [label="ADC_STOP\nLow Power"]; ready [label="ADC_READY\nClock Enabled"]; - running [label="ADC_RUNNING\nConverting"]; + running [label="ADC_RUNNING"]; + complete [label="ADC_COMPLETE"]; uninit -> stop [label="adcObjectInit()"]; stop -> ready [label="adcStart()"]; ready -> ready [label="adcStart()"]; + ready -> ready [label="adcWaitConversion()"]; ready -> stop [label="adcStop()"]; stop -> stop [label="adcStop()"]; ready -> running [label="adcStartConversion()"]; running -> ready [label="adcStopConversion()"]; - running -> ready [label="End of Conversion"]; + running -> complete [label="End of Conversion"]; + complete -> running [label="adcStartConversion()"]; + complete -> ready [label="adcStopConversion()"]; + complete -> ready [label="adcWaitConversion()"]; + complete -> stop [label="adcStop()"]; } * @enddot * @@ -223,6 +256,43 @@ * @ingroup ADC */ +/** + * @defgroup CAN CAN Driver + * @brief Generic ADC Driver. + * @details This module implements a generic ADC driver. The driver implements + * a state machine internally: + * @dot + digraph example { + rankdir="LR"; + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.8", height="0.8"]; + edge [fontname=Helvetica, fontsize=8]; + uninit [label="CAN_UNINIT", style="bold"]; + stop [label="CAN_STOP\nLow Power"]; + ready [label="CAN_READY\nClock Enabled"]; + sleep [label="CAN_SLEEP\nLow Power"]; + uninit -> stop [label="canObjectInit()"]; + stop -> stop [label="canStop()"]; + stop -> ready [label="canStart()"]; + ready -> stop [label="canStop()"]; + ready -> ready [label="canReceive()\ncanTransmit()"]; + ready -> ready [label="canStart()"]; + ready -> sleep [label="canSleep()"]; + sleep -> sleep [label="canSleep()"]; + sleep -> ready [label="canWakeup()"]; + sleep -> ready [label="wakeup event"]; + } + * @enddot + * + * @ingroup IO + */ + +/** + * @defgroup CAN_LLD CAN Low Level Driver + * @brief @ref HAL low level driver template. + * + * @ingroup CAN + */ + /** * @defgroup MAC MAC Driver * @brief Generic MAC driver. diff --git a/os/io/readme.txt b/os/io/readme.txt index 24aace302..252acaae1 100644 --- a/os/io/readme.txt +++ b/os/io/readme.txt @@ -1,4 +1 @@ -ChibiOS/RT I/O abstraction layer, available drivers: -- PAL. Digital I/O ports abstraction layer. -- Serial. Buffered, interrupt driven, serial communication driver using OS - queues, channels and events. +ChibiOS/RT HAL code