1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-10 06:01:52 +00:00

boot: i2c driver fixes

This commit is contained in:
Michael Scire 2019-05-02 19:32:03 -07:00
parent 4ea6ce3156
commit fe0d41623c
2 changed files with 2 additions and 1 deletions

View file

@ -500,7 +500,7 @@ void I2cBusAccessor::WriteTransferHeader(TransferMode transfer_mode, I2cTransact
hdr_val |= ((transfer_mode == TransferMode_Receive) & 1) << 19;
hdr_val |= ((addressing_mode != AddressingMode_7Bit) & 1) << 18;
hdr_val |= (1 << 17);
hdr_val |= (((option & I2cTransactionOption_Stop) != 0) & 1) << 18;
hdr_val |= (((option & I2cTransactionOption_Stop) == 0) & 1) << 16;
hdr_val |= slave_addr_val;
WriteRegister(&this->i2c_registers->I2C_I2C_TX_PACKET_FIFO_0, hdr_val);

View file

@ -51,6 +51,7 @@ void I2cDriverSession::Close(){
if (this->open) {
this->bus_accessor->Close();
this->bus_accessor = nullptr;
this->open = false;
}
}