Changeset 9db9024 in rtems


Ignore:
Timestamp:
Sep 28, 2017, 9:31:32 AM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f043b9b
Parents:
ce28d601
git-author:
Sebastian Huber <sebastian.huber@…> (09/28/17 09:31:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/02/17 11:40:56)
Message:

bsp/imx: Fix I2C register header

Update #3090.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/imx/include/arm/freescale/imx/imx_i2creg.h

    rce28d601 r9db9024  
    1919
    2020typedef struct {
    21         uint32_t iadr;
    22 #define IMX_I2C_IADR_ADR(val) BSP_FLD32(val, 1, 7)
    23 #define IMX_I2C_IADR_ADR_GET(reg) BSP_FLD32GET(reg, 1, 7)
    24 #define IMX_I2C_IADR_ADR_SET(reg, val) BSP_FLD32SET(reg, val, 1, 7)
    25         uint32_t ifdr;
    26 #define IMX_I2C_IFDR_IC(val) BSP_FLD32(val, 0, 5)
    27 #define IMX_I2C_IFDR_IC_GET(reg) BSP_FLD32GET(reg, 0, 5)
    28 #define IMX_I2C_IFDR_IC_SET(reg, val) BSP_FLD32SET(reg, val, 0, 5)
    29         uint32_t i2cr;
    30 #define IMX_I2C_I2CR_IEN BSP_BIT32(7)
    31 #define IMX_I2C_I2CR_IIEN BSP_BIT32(6)
    32 #define IMX_I2C_I2CR_MSTA BSP_BIT32(5)
    33 #define IMX_I2C_I2CR_MTX BSP_BIT32(4)
    34 #define IMX_I2C_I2CR_TXAK BSP_BIT32(3)
    35 #define IMX_I2C_I2CR_RSTA BSP_BIT32(2)
    36         uint32_t i2sr;
    37 #define IMX_I2C_I2SR_ICF BSP_BIT32(7)
    38 #define IMX_I2C_I2SR_IAAS BSP_BIT32(6)
    39 #define IMX_I2C_I2SR_IBB BSP_BIT32(5)
    40 #define IMX_I2C_I2SR_IAL BSP_BIT32(4)
    41 #define IMX_I2C_I2SR_SRW BSP_BIT32(2)
    42 #define IMX_I2C_I2SR_IIF BSP_BIT32(1)
    43 #define IMX_I2C_I2SR_RXAK BSP_BIT32(0)
    44         uint32_t i2dr;
    45 #define IMX_I2C_I2DR_DATA(val) BSP_FLD32(val, 0, 7)
    46 #define IMX_I2C_I2DR_DATA_GET(reg) BSP_FLD32GET(reg, 0, 7)
    47 #define IMX_I2C_I2DR_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
     21        uint16_t iadr;
     22#define IMX_I2C_IADR_ADR(val) BSP_FLD16(val, 1, 7)
     23#define IMX_I2C_IADR_ADR_GET(reg) BSP_FLD16GET(reg, 1, 7)
     24#define IMX_I2C_IADR_ADR_SET(reg, val) BSP_FLD16SET(reg, val, 1, 7)
     25        uint16_t reserved_02;
     26        uint16_t ifdr;
     27#define IMX_I2C_IFDR_IC(val) BSP_FLD16(val, 0, 5)
     28#define IMX_I2C_IFDR_IC_GET(reg) BSP_FLD16GET(reg, 0, 5)
     29#define IMX_I2C_IFDR_IC_SET(reg, val) BSP_FLD16SET(reg, val, 0, 5)
     30        uint16_t reserved_06;
     31        uint16_t i2cr;
     32#define IMX_I2C_I2CR_IEN BSP_BIT16(7)
     33#define IMX_I2C_I2CR_IIEN BSP_BIT16(6)
     34#define IMX_I2C_I2CR_MSTA BSP_BIT16(5)
     35#define IMX_I2C_I2CR_MTX BSP_BIT16(4)
     36#define IMX_I2C_I2CR_TXAK BSP_BIT16(3)
     37#define IMX_I2C_I2CR_RSTA BSP_BIT16(2)
     38        uint16_t reserved_0a;
     39        uint16_t i2sr;
     40#define IMX_I2C_I2SR_ICF BSP_BIT16(7)
     41#define IMX_I2C_I2SR_IAAS BSP_BIT16(6)
     42#define IMX_I2C_I2SR_IBB BSP_BIT16(5)
     43#define IMX_I2C_I2SR_IAL BSP_BIT16(4)
     44#define IMX_I2C_I2SR_SRW BSP_BIT16(2)
     45#define IMX_I2C_I2SR_IIF BSP_BIT16(1)
     46#define IMX_I2C_I2SR_RXAK BSP_BIT16(0)
     47        uint16_t reserved_0e;
     48        uint16_t i2dr;
     49#define IMX_I2C_I2DR_DATA(val) BSP_FLD16(val, 0, 7)
     50#define IMX_I2C_I2DR_DATA_GET(reg) BSP_FLD16GET(reg, 0, 7)
     51#define IMX_I2C_I2DR_DATA_SET(reg, val) BSP_FLD16SET(reg, val, 0, 7)
    4852} imx_i2c;
    4953
Note: See TracChangeset for help on using the changeset viewer.