From 302d06cc6652cd44f961c35c7194ff3145f55406 Mon Sep 17 00:00:00 2001 From: barthess Date: Wed, 20 Jul 2011 08:35:05 +0000 Subject: I2C. All polling waitins code replaced by "waiting" GPT interrups. Documentation fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3167 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/dox/i2c.dox | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'os/hal/dox') diff --git a/os/hal/dox/i2c.dox b/os/hal/dox/i2c.dox index cd5e3f698..8e6f78649 100644 --- a/os/hal/dox/i2c.dox +++ b/os/hal/dox/i2c.dox @@ -22,7 +22,12 @@ * @defgroup I2C I2C Driver * @brief Generic I2C Driver. * @details This module implements a generic I2C (Inter-Integrated Circuit) - * driver. + * driver. On STM32 platform you can choose method of waiting START + * and STOP bits: polling wait or wait using GPT. GPT method use + * one timer per I2C interface, on the other hand -- polling is + * block function that starts transfer. + * @note If you decide to use polling wait -- do NOT start transmit or + * receive from callback because it run in ISR context. * @pre In order to use the I2C driver the @p HAL_USE_I2C option * must be enabled in @p halconf.h. * @@ -34,20 +39,23 @@ * @dot digraph example { rankdir="LR"; - node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="false", width="0.9", height="0.9"]; edge [fontname=Helvetica, fontsize=8]; uninit [label="I2C_UNINIT", style="bold"]; stop [label="I2C_STOP\nLow Power"]; ready [label="I2C_READY\nClock Enabled"]; - active [label="I2C_ACTIVE\nBus Active"]; + active_tx [label="I2C_ACTIVE_TRANSMIT\nBus TX Active"]; + active_rx [label="I2C_ACTIVE_RECEIVE\nBus RX Active"]; uninit -> stop [label="i2cInit()"]; - stop -> stop [label="i2cStop()"]; + stop -> stop [label="i2cStop()"]; stop -> ready [label="i2cStart()"]; - ready -> active [label="i2cMasterTransmit()\ni2cMasterReceive()"]; - active -> ready [label="_i2c_isr_code()"]; + ready -> active_tx [label="i2cMasterTransmit()"]; + ready -> active_rx [label="i2cMasterReceive()"]; + active_tx -> ready [label="_i2c_isr_code()"]; + active_rx -> ready [label="_i2c_isr_code()"]; ready -> stop [label="i2cStop()"]; } * @enddot -- cgit v1.2.3