mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-28 05:34:11 -04:00
i2c: command list format, get boot down to linker errors
This commit is contained in:
parent
42caa4ffd1
commit
258cfb62a2
13 changed files with 233 additions and 50 deletions
|
@ -20,16 +20,14 @@ namespace ams::boot {
|
|||
|
||||
class RtcDriver {
|
||||
private:
|
||||
i2c::driver::Session i2c_session;
|
||||
i2c::driver::I2cSession i2c_session;
|
||||
public:
|
||||
RtcDriver() {
|
||||
i2c::driver::Initialize();
|
||||
i2c::driver::OpenSession(&this->i2c_session, I2cDevice_Max77620Rtc);
|
||||
R_ABORT_UNLESS(i2c::driver::OpenSession(std::addressof(this->i2c_session), i2c::DeviceCode_Max77620Rtc));
|
||||
}
|
||||
|
||||
~RtcDriver() {
|
||||
i2c::driver::CloseSession(this->i2c_session);
|
||||
i2c::driver::Finalize();
|
||||
}
|
||||
private:
|
||||
Result ReadRtcRegister(u8 *out, u8 address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue