interrupt void i2c_int1a_isr(void) {//I2CA的中断响应函数 Uint16 IntSource;// 读取中断码 IntSource=I2caRegs.I2CISRC.bit.INTCODE & 0x7;//I2CA中断源,读后3位 switch(IntSource){//依中断源而确定相关接收和发送策略 case I2C_NO_ISRC://=0 case I2C_ARB_ISRC://=1 case I2C_NACK_ISRC: ...
// This function is found in f2802x_PieVect.c. InitPieVectTable(); // Interrupts that are used in this example are re-mapped to // ISR functions found within this file. EALLOW; // This is needed to write to EALLOW protected registers PieVectTable.I2CINT1A = &i2c_int1a_isr; EDIS; //...
interrupt void i2c_int1a_isr(void) // I2C-A { Uint16 IntSource, i; // Read interrupt source IntSource = I2caRegs.I2CISRC.all; // Interrupt source = stop condition detected if(IntSource == I2C_SCD_ISRC) { // If completed message was writing data, reset msg to inactive s...
interrupt void i2c_int1a_isr(void) // I2C-A { Uint16 IntSource;// Read interrupt source...
I2C的中断服务程序I2CINT1A_ISR需要通过查询中断源寄存器I2CISRC来确定中断源。然后I2CINT1A_ISR才能跳转到相应的中断函数。 在CPU查询完I2CISRC后将会发生下列事件: 1、I2CSTR寄存器里相应的中断标志位被清除。但是,ARDY,RRDY,XRDY位不会被清除。写1可以清除这三位。 2、仲裁决定剩下的中断哪个优先级最高。中断...
interruptvoidI2CINT1A_ISR(void){Uint16 status;status = I2caRegs.I2CISRC.all;if(status == 0x05...
28335的I2C数据手册翻译
This is needed to write to EALLOW protected registers// PieVectTable.I2CINT1A = &i2c_int1a_isr...
I2C中断请求映射到了PIE第八组的中断1 I2CINT1A_ISR,FIFO中断请求映射到了PIE第八组的中断2I2CINT2A_ISR,这些在下面的存放器里有详细的说明。I2C根本中断请求:每一个中断信号在状态存放器I2CSTR中都有一个标志位,在中断使能存放器I2CIER里都有使能位。当一个确定的中断事件发生以后,它的中断标志位会被置1,...
interruptvoidiic_int1a_isr(void); interruptvoidiic_int2a_isr(void); voidIIC_Driver(void); voidmain(void){ InitSysCtrl(); InitI2CGpio(); DINT; InitPieCtrl(); IER=0x0000; IFR=0x0000; InitPieVectTable(); EALLOW;//ThisisneededtowritetoEALLOWprotectedregisters PieVectTable.I2CINT1A=&iic_...