Fix test for direction switch

This commit is contained in:
Jeremy Soller 2019-11-13 14:36:20 -07:00
parent 890d8e9968
commit b1d0aaf180
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -88,9 +88,9 @@ static int i2c_transaction(uint8_t * data, int length, bool read) {
HOSTAA = HOSTAA;
} else
// If we are waiting on direction switch
if (HOCTLA & (1 << 2)) {
if (HOCTL2A & (1 << 2)) {
// Complete direction switch
HOCTLA &= ~(1 << 2);
HOCTL2A &= ~(1 << 2);
} else {
// Start new transaction
HOCTLA = (1 << 6) | (0b111 << 2);