⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i2cdef.h

📁 本程序为ST公司开发的源代码
💻 H
字号:
/************************************************** * * * CVS ID:   $Id: i2cdef.h,v 1.2 2006/04/26 17:59:53 kutik Exp $ * Author:   Maurizio Marcucci [MM] - STM * Date:     $Date: 2006/04/26 17:59:53 $ * Revision: $Revision: 1.2 $ *  * Description: *  *   Accordo+ Hardware registers definition * *************************************************** *  * COPYRIGHT (C) ST Microelectronics  2005 *            All Rights Reserved * ***************************************************/#ifndef __I2CDEF_H#define __I2CDEF_H// I2C CR Registertypedef struct{ UInt ite   : 1;  // Bit 0 UInt stop  : 1;  // Bit 1 UInt ack   : 1;  // Bit 2 UInt start : 1;  // Bit 3 UInt engc  : 1;  // Bit 4 UInt pe    : 1;  // Bit 5 UInt       : 2;  // Bit 6-7 UInt       : 24;} I2C_CR_STRUCT;typedef union{ I2C_CR_STRUCT field; uint32  all;} I2C_CR_UNION;// I2C SR1 registertypedef struct{ UInt sb    : 1; // Bit 0 UInt m_sl  : 1; // Bit 1 UInt adsl  : 1; // Bit 2 UInt btf   : 1; // Bit 3 UInt busy  : 1; // Bit 4 UInt tra   : 1; // Bit 5 UInt add10 : 1; // Bit 6 UInt evf   : 1; // Bit 7 UInt       : 24;} I2C_SR1_STRUCT;typedef union{ I2C_SR1_STRUCT field; uint32         all;} I2C_SR1_UNION;// I2C SR2 registertypedef struct{ UInt gcal    : 1; // Bit 0 UInt berr    : 1; // Bit 1 UInt arlo    : 1; // Bit 2 UInt stopf   : 1; // Bit 3 UInt af      : 1; // Bit 4 UInt endad   : 1; // Bit 5 UInt         : 2; // Bit 6-7 UInt         : 24;} I2C_SR2_STRUCT;typedef union{ I2C_SR2_STRUCT field; uint32         all;} I2C_SR2_UNION;// I2C OAR2 registertypedef struct{ UInt           : 1;  // Bit 0 UInt add_8_9   : 2;  // Bit 1-2 UInt           : 2;  // Bit 3-4 UInt fr        : 3;  // Bit 5-7 UInt           : 24;} I2C_OAR2_STRUCT;typedef union{ I2C_OAR2_STRUCT field; uint32         all;} I2C_OAR2_UNION;// I2C CCR registertypedef struct{ UInt cc_0_6    : 7;  // Bit 0 UInt fm_sm     : 1;  // Bit 1-2 UInt           : 24;} I2C_CCR_STRUCT;typedef union{ I2C_CCR_STRUCT field; uint32         all;} I2C_CCR_UNION;#endif /* __I2CDEF_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -