RT-AICHIPV3-sample
マクロ定義 | 関数
i2c.h ファイル
被依存関係図:

[ソースコード]

マクロ定義

#define FAST_MODE_PLUS   0
 
#define BUFSIZE   0x80
 
#define MAX_TIMEOUT   0x00FFFFFF
 
#define I2CMASTER   0x01
 
#define I2CSLAVE   0x02
 
#define MPU6050_W   0xd0
 
#define MPU6050_R   0xd1
 
#define AK8975_W   0x18
 
#define AK8975_R   0x19
 
#define PCF8594_ADDR   0xA0
 
#define READ_WRITE   0x01
 
#define RD_BIT   0x01
 
#define I2C_IDLE   0
 
#define I2C_STARTED   1
 
#define I2C_RESTARTED   2
 
#define I2C_REPEATED_START   3
 
#define DATA_ACK   4
 
#define DATA_NACK   5
 
#define I2CONSET_I2EN   0x00000040 /* I2C Control Set Register */
 
#define I2CONSET_AA   0x00000004
 
#define I2CONSET_SI   0x00000008
 
#define I2CONSET_STO   0x00000010
 
#define I2CONSET_STA   0x00000020
 
#define I2CONCLR_AAC   0x00000004 /* I2C Control clear Register */
 
#define I2CONCLR_SIC   0x00000008
 
#define I2CONCLR_STAC   0x00000020
 
#define I2CONCLR_I2ENC   0x00000040
 
#define I2DAT_I2C   0x00000000 /* I2C Data Reg */
 
#define I2ADR_I2C   0x00000000 /* I2C Slave Address Reg */
 
#define I2SCLH_SCLH   0x00000180 /* I2C SCL Duty Cycle High Reg */
 
#define I2SCLL_SCLL   0x00000180 /* I2C SCL Duty Cycle Low Reg */
 
#define I2SCLH_HS_SCLH   0x00000020 /* Fast Plus I2C SCL Duty Cycle High Reg */
 
#define I2SCLL_HS_SCLL   0x00000020 /* Fast Plus I2C SCL Duty Cycle Low Reg */
 

関数

void I2C_IRQHandler (void)
 
uint32_t I2CInit (uint32_t I2cMode)
 
uint32_t I2CStart (void)
 
uint32_t I2CStop (void)
 
uint32_t I2CEngine (void)
 

マクロ定義詳解

◆ AK8975_R

#define AK8975_R   0x19

◆ AK8975_W

#define AK8975_W   0x18

◆ BUFSIZE

#define BUFSIZE   0x80

◆ DATA_ACK

#define DATA_ACK   4

◆ DATA_NACK

#define DATA_NACK   5

◆ FAST_MODE_PLUS

#define FAST_MODE_PLUS   0

◆ I2ADR_I2C

#define I2ADR_I2C   0x00000000 /* I2C Slave Address Reg */

◆ I2C_IDLE

#define I2C_IDLE   0

◆ I2C_REPEATED_START

#define I2C_REPEATED_START   3

◆ I2C_RESTARTED

#define I2C_RESTARTED   2

◆ I2C_STARTED

#define I2C_STARTED   1

◆ I2CMASTER

#define I2CMASTER   0x01

◆ I2CONCLR_AAC

#define I2CONCLR_AAC   0x00000004 /* I2C Control clear Register */

◆ I2CONCLR_I2ENC

#define I2CONCLR_I2ENC   0x00000040

◆ I2CONCLR_SIC

#define I2CONCLR_SIC   0x00000008

◆ I2CONCLR_STAC

#define I2CONCLR_STAC   0x00000020

◆ I2CONSET_AA

#define I2CONSET_AA   0x00000004

◆ I2CONSET_I2EN

#define I2CONSET_I2EN   0x00000040 /* I2C Control Set Register */

◆ I2CONSET_SI

#define I2CONSET_SI   0x00000008

◆ I2CONSET_STA

#define I2CONSET_STA   0x00000020

◆ I2CONSET_STO

#define I2CONSET_STO   0x00000010

◆ I2CSLAVE

#define I2CSLAVE   0x02

◆ I2DAT_I2C

#define I2DAT_I2C   0x00000000 /* I2C Data Reg */

◆ I2SCLH_HS_SCLH

#define I2SCLH_HS_SCLH   0x00000020 /* Fast Plus I2C SCL Duty Cycle High Reg */

◆ I2SCLH_SCLH

#define I2SCLH_SCLH   0x00000180 /* I2C SCL Duty Cycle High Reg */

◆ I2SCLL_HS_SCLL

#define I2SCLL_HS_SCLL   0x00000020 /* Fast Plus I2C SCL Duty Cycle Low Reg */

◆ I2SCLL_SCLL

#define I2SCLL_SCLL   0x00000180 /* I2C SCL Duty Cycle Low Reg */

◆ MAX_TIMEOUT

#define MAX_TIMEOUT   0x00FFFFFF

◆ MPU6050_R

#define MPU6050_R   0xd1

◆ MPU6050_W

#define MPU6050_W   0xd0

◆ PCF8594_ADDR

#define PCF8594_ADDR   0xA0

◆ RD_BIT

#define RD_BIT   0x01

◆ READ_WRITE

#define READ_WRITE   0x01

関数詳解

◆ I2C_IRQHandler()

void I2C_IRQHandler ( void  )

◆ I2CEngine()

uint32_t I2CEngine ( void  )
呼び出し関係図:
被呼び出し関係図:

◆ I2CInit()

uint32_t I2CInit ( uint32_t  I2cMode)
被呼び出し関係図:

◆ I2CStart()

uint32_t I2CStart ( void  )
被呼び出し関係図:

◆ I2CStop()

uint32_t I2CStop ( void  )
被呼び出し関係図: