Subversion Repositories FlightCtrl

Rev

Rev 1461 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1461 Rev 1465
Line 31... Line 31...
31
        case SR_SLA_ACK:  
31
        case SR_SLA_ACK:  
32
            TWCR |= (1<<TWINT);
32
            TWCR |= (1<<TWINT);
33
            Byte_Counter = 0;
33
            Byte_Counter = 0;
34
            return;
34
            return;
35
        case SR_PREV_ACK:
35
        case SR_PREV_ACK:
36
                        I2C_timeout = 5;
36
                        I2C_timeout = 3;
37
                        if (Byte_Counter < 32) {
37
                        if (Byte_Counter < 32) {
38
                                I2C_RXBuffer[Byte_Counter++] = TWDR;
38
                                I2C_RXBuffer[Byte_Counter++] = TWDR;
39
                        }
39
                        }
40
                        if (Byte_Counter == 7) {
40
                        if (Byte_Counter == 7) {
41
                                if (calc_crc(&I2C_RXBuffer, 6) == I2C_RXBuffer[6]) {
41
                                if (calc_crc(&I2C_RXBuffer, 6) == I2C_RXBuffer[6]) {