NAK I²C write when EDID protected
This commit is contained in:
parent
8bc856095e
commit
888a5af823
4
main.c
4
main.c
|
@ -580,7 +580,11 @@ void i2c(void) __interrupt(IRQ_I2C) // auto wakeup
|
|||
I2C_DR = *(uint8_t*)(EEPROM_ADDR + i2c_addr++); // transmit selected byte
|
||||
i2c_input_new = false; // notify we send data
|
||||
} else { // we will receive data
|
||||
if (EDID_PORT->IDR.reg & EDID_PIN) { // EDID switched off
|
||||
I2C_CR2 &= I2C_CR2_ACK; // NACK next received byte to indicate programming it disabled
|
||||
} else {
|
||||
I2C_CR2 |= I2C_CR2_ACK; // ACK next received byte
|
||||
}
|
||||
i2c_input_new = true; // notify we get data
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue