aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-12 18:26:39 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-12 18:26:39 +0000
commit621d794bf0d2a6456221f1e478de66e48c293063 (patch)
tree5e1d92a9110b4b84218529b5a0d688ff8c468db7 /os/hal/include
parent44960790c58f9055068dbc427384ae8d20048334 (diff)
downloadChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.tar.gz
ChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.tar.bz2
ChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.zip
I2C. Documentation improvements. Dead code clenups.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3153 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/i2c.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index 1e7ce3e1e..19eab3b35 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -79,13 +79,12 @@
*/
typedef enum {
/* master part */
- I2C_UNINIT = 0, /**< @brief Not initialized. */
- I2C_STOP = 1, /**< @brief Stopped. */
- I2C_READY = 2, /**< @brief Ready. */
- I2C_ACTIVE = 3, /**< @brief In communication. */
- I2C_COMPLETE = 4, /**< @brief Asynchronous operation complete. */
+ I2C_UNINIT = 0, /**< @brief Not initialized. */
+ I2C_STOP = 1, /**< @brief Stopped. */
+ I2C_READY = 2, /**< @brief Ready. */
+ I2C_ACTIVE = 3, /**< @brief In communication. */
- /* slave part */
+ /* Slave part. Not realized. */
I2C_SACTIVE = 10,
I2C_STRANSMIT = 11,
I2C_SRECEIVE = 12,
@@ -209,11 +208,9 @@ struct I2CSlaveConfig{
* @notapi
*/
#define _i2c_isr_code(i2cp, i2cscfg) { \
- (i2cp)->id_state = I2C_COMPLETE; \
if(((i2cp)->id_slave_config)->id_callback) { \
((i2cp)->id_slave_config)->id_callback(i2cp, i2cscfg); \
- if((i2cp)->id_state == I2C_COMPLETE) \
- (i2cp)->id_state = I2C_READY; \
+ (i2cp)->id_state = I2C_READY; \
} \
else \
(i2cp)->id_state = I2C_READY; \
@@ -235,11 +232,9 @@ struct I2CSlaveConfig{
* @notapi
*/
#define _i2c_isr_err_code(i2cp, i2cscfg) { \
- (i2cp)->id_state = I2C_COMPLETE; \
if(((i2cp)->id_slave_config)->id_err_callback) { \
((i2cp)->id_slave_config)->id_err_callback(i2cp, i2cscfg); \
- if((i2cp)->id_state == I2C_COMPLETE) \
- (i2cp)->id_state = I2C_READY; \
+ (i2cp)->id_state = I2C_READY; \
} \
else \
(i2cp)->id_state = I2C_READY; \