Rev 23 | Rev 25 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 23 | Rev 24 | ||
---|---|---|---|
Line 145... | Line 145... | ||
145 | switch (TW_STATUS) |
145 | switch (TW_STATUS) |
146 | { |
146 | { |
147 | case TW_SR_SLA_ACK: // slave addressed in receiver mode and ack has been returned |
147 | case TW_SR_SLA_ACK: // slave addressed in receiver mode and ack has been returned |
148 | Rx_Idx = 0xFF; // reset rx buffer pointer |
148 | Rx_Idx = 0xFF; // reset rx buffer pointer |
149 | TWCR_ACK; // trigger receiving of first data byte and send ack afterwards |
149 | TWCR_ACK; // trigger receiving of first data byte and send ack afterwards |
150 | LED_GRN_TOGGLE; |
- | |
151 | return; |
150 | return; |
Line 152... | Line 151... | ||
152 | 151 | ||
153 | case TW_SR_DATA_ACK: // data has been received and ack has been returned |
152 | case TW_SR_DATA_ACK: // data has been received and ack has been returned |
154 | data = TWDR; |
153 | data = TWDR; |