aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-22 14:41:48 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-22 15:07:08 -0400
commit929ef7192a497c7b6dc9d72c8bf455dc152dffbc (patch)
tree98c47041784bcb3cce144ece51c76b768365f677 /libmaple
parente397f7c18b775aacf40223a7cc91cba547e819e7 (diff)
downloadlibrambutan-929ef7192a497c7b6dc9d72c8bf455dc152dffbc.tar.gz
librambutan-929ef7192a497c7b6dc9d72c8bf455dc152dffbc.zip
<libmaple/i2c.h>: Add I2C_CCR_DUTY bit value definitions.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/include/libmaple/i2c.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmaple/include/libmaple/i2c.h b/libmaple/include/libmaple/i2c.h
index f7821af..ff1c313 100644
--- a/libmaple/include/libmaple/i2c.h
+++ b/libmaple/include/libmaple/i2c.h
@@ -181,7 +181,9 @@ typedef struct i2c_msg {
/* Clock control register */
#define I2C_CCR_FS (1U << 15) // Fast mode selection
-#define I2C_CCR_DUTY (1U << 14) // 16/9 duty ratio
+#define I2C_CCR_DUTY (1U << 14) // Fast mode duty cycle
+#define I2C_CCR_DUTY_2_1 (0U << 14) // Fast mode duty: 2/1
+#define I2C_CCR_DUTY_16_9 (1U << 14) // Fast mode duty: 16/9
#define I2C_CCR_CCR 0xFFF // Clock control bits
/*