[rtems commit] bsp/imx: Fix I2C register header
Sebastian Huber
sebh at rtems.org
Mon Oct 2 11:42:08 UTC 2017
Module: rtems
Branch: master
Commit: 9db9024b7d91f145c4feb8b0572cbafe8c972c3a
Changeset: http://git.rtems.org/rtems/commit/?id=9db9024b7d91f145c4feb8b0572cbafe8c972c3a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Sep 28 11:31:32 2017 +0200
bsp/imx: Fix I2C register header
Update #3090.
---
.../arm/imx/include/arm/freescale/imx/imx_i2creg.h | 58 ++++++++++++----------
1 file changed, 31 insertions(+), 27 deletions(-)
diff --git a/c/src/lib/libbsp/arm/imx/include/arm/freescale/imx/imx_i2creg.h b/c/src/lib/libbsp/arm/imx/include/arm/freescale/imx/imx_i2creg.h
index 52201c7..0f1b7f1 100644
--- a/c/src/lib/libbsp/arm/imx/include/arm/freescale/imx/imx_i2creg.h
+++ b/c/src/lib/libbsp/arm/imx/include/arm/freescale/imx/imx_i2creg.h
@@ -18,33 +18,37 @@
#include <bsp/utility.h>
typedef struct {
- uint32_t iadr;
-#define IMX_I2C_IADR_ADR(val) BSP_FLD32(val, 1, 7)
-#define IMX_I2C_IADR_ADR_GET(reg) BSP_FLD32GET(reg, 1, 7)
-#define IMX_I2C_IADR_ADR_SET(reg, val) BSP_FLD32SET(reg, val, 1, 7)
- uint32_t ifdr;
-#define IMX_I2C_IFDR_IC(val) BSP_FLD32(val, 0, 5)
-#define IMX_I2C_IFDR_IC_GET(reg) BSP_FLD32GET(reg, 0, 5)
-#define IMX_I2C_IFDR_IC_SET(reg, val) BSP_FLD32SET(reg, val, 0, 5)
- uint32_t i2cr;
-#define IMX_I2C_I2CR_IEN BSP_BIT32(7)
-#define IMX_I2C_I2CR_IIEN BSP_BIT32(6)
-#define IMX_I2C_I2CR_MSTA BSP_BIT32(5)
-#define IMX_I2C_I2CR_MTX BSP_BIT32(4)
-#define IMX_I2C_I2CR_TXAK BSP_BIT32(3)
-#define IMX_I2C_I2CR_RSTA BSP_BIT32(2)
- uint32_t i2sr;
-#define IMX_I2C_I2SR_ICF BSP_BIT32(7)
-#define IMX_I2C_I2SR_IAAS BSP_BIT32(6)
-#define IMX_I2C_I2SR_IBB BSP_BIT32(5)
-#define IMX_I2C_I2SR_IAL BSP_BIT32(4)
-#define IMX_I2C_I2SR_SRW BSP_BIT32(2)
-#define IMX_I2C_I2SR_IIF BSP_BIT32(1)
-#define IMX_I2C_I2SR_RXAK BSP_BIT32(0)
- uint32_t i2dr;
-#define IMX_I2C_I2DR_DATA(val) BSP_FLD32(val, 0, 7)
-#define IMX_I2C_I2DR_DATA_GET(reg) BSP_FLD32GET(reg, 0, 7)
-#define IMX_I2C_I2DR_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
+ uint16_t iadr;
+#define IMX_I2C_IADR_ADR(val) BSP_FLD16(val, 1, 7)
+#define IMX_I2C_IADR_ADR_GET(reg) BSP_FLD16GET(reg, 1, 7)
+#define IMX_I2C_IADR_ADR_SET(reg, val) BSP_FLD16SET(reg, val, 1, 7)
+ uint16_t reserved_02;
+ uint16_t ifdr;
+#define IMX_I2C_IFDR_IC(val) BSP_FLD16(val, 0, 5)
+#define IMX_I2C_IFDR_IC_GET(reg) BSP_FLD16GET(reg, 0, 5)
+#define IMX_I2C_IFDR_IC_SET(reg, val) BSP_FLD16SET(reg, val, 0, 5)
+ uint16_t reserved_06;
+ uint16_t i2cr;
+#define IMX_I2C_I2CR_IEN BSP_BIT16(7)
+#define IMX_I2C_I2CR_IIEN BSP_BIT16(6)
+#define IMX_I2C_I2CR_MSTA BSP_BIT16(5)
+#define IMX_I2C_I2CR_MTX BSP_BIT16(4)
+#define IMX_I2C_I2CR_TXAK BSP_BIT16(3)
+#define IMX_I2C_I2CR_RSTA BSP_BIT16(2)
+ uint16_t reserved_0a;
+ uint16_t i2sr;
+#define IMX_I2C_I2SR_ICF BSP_BIT16(7)
+#define IMX_I2C_I2SR_IAAS BSP_BIT16(6)
+#define IMX_I2C_I2SR_IBB BSP_BIT16(5)
+#define IMX_I2C_I2SR_IAL BSP_BIT16(4)
+#define IMX_I2C_I2SR_SRW BSP_BIT16(2)
+#define IMX_I2C_I2SR_IIF BSP_BIT16(1)
+#define IMX_I2C_I2SR_RXAK BSP_BIT16(0)
+ uint16_t reserved_0e;
+ uint16_t i2dr;
+#define IMX_I2C_I2DR_DATA(val) BSP_FLD16(val, 0, 7)
+#define IMX_I2C_I2DR_DATA_GET(reg) BSP_FLD16GET(reg, 0, 7)
+#define IMX_I2C_I2DR_DATA_SET(reg, val) BSP_FLD16SET(reg, val, 0, 7)
} imx_i2c;
#endif /* IMX_I2CREG_H */
More information about the vc
mailing list