i2cs_hr.h

来自「ST7 Mcu I2C slave mode code for learning」· C头文件 代码 · 共 51 行

H
51
字号
/******************************************************************************
COPYRIGHT 2003 STMicroelectronics 
Source File Name : I2C_hr.h
Group            : IPSW,CMG - IPDF
Author           : MCD Application Team
Date First Issued: 04/03/2002
********************************Documentation**********************************
General Purpose - This file declares all the hardware registers as extern

********************************Revision History*******************************
_______________________________________________________________________________
Date :14/10/2003                  Release:1.0       	   		        	      
******************************************************************************/
#ifndef I2C_SLAVE_HR_H
#define I2C_SLAVE_HR_H 

/*****************************************************************************/
/***** H A R D W A R E   R E G I S T E R   B I T   D E F I N I T I O N S *****/
/*****************************************************************************/

/* Control Register                                                          */

#define I2Cs_PE          0x20                      /* Peripheral enable flag */
#define I2Cs_ENGC        0x10                   /* General Call enable flag  */  
#define I2Cs_START       0x08                                  /* Start flag */
#define I2Cs_ACK         0x04                        /* I2C acknowledge flag */
#define I2Cs_STOP        0x02                                   /* Stop flag */
#define I2Cs_ITE         0x01                      /* Interrupt enable flag  */  

/* Status register1                                                          */
#define I2Cs_EVF         0x80                                  /* Event flag */
#define I2Cs_TRA         0x20                      /* Interrupt enable flags */
#define I2Cs_BUSY        0x10                                  /* Busy flag  */
#define I2Cs_BTF         0x08                   /* Byte transfer status flag */
#define I2Cs_ADSL        0x04                          /* Adress Select flag */

/* Status register2                                                          */

#define I2Cs_AF          0x10                         /* Acknowledge failure */
#define I2Cs_STOPF       0x08                         /* Stop Detected       */
#define I2Cs_BRR         0x02                         /* Buss Error          */
#define I2Cs_GCAL        0x01                         /* General Call enable */
                                          
                                          
#if (defined I2C_72F521 || defined I2C_72F63 || defined I2C_72F264)
#define I2Cs_ERR         0x1A                           /* Tx Error flags    */
#endif

#endif

/*** (c) 2003   STMicroelectronics ****************** END OF FILE ************/

⌨️ 快捷键说明

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