rename setup->init to be consistent with other crates

This commit is contained in:
bunnie 2023-07-16 17:34:43 +08:00
parent 04ca49b1cc
commit cdddb59e33
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ impl I2cStateMachine {
i2c
}
pub fn setup(&mut self) {
pub fn init(&mut self) {
xous::claim_interrupt(
utra::i2c::I2C_IRQ,
handle_i2c_irq,

View file

@ -36,7 +36,7 @@ fn i2c_thread(i2c_sid: xous::SID, power_csr_raw: u32, wfi_state: Arc::<AtomicBoo
let handler_conn = xous::connect(i2c_sid).expect("couldn't make handler connection for i2c");
let mut i2c = Box::new(i2c::I2cStateMachine::new(handler_conn, power_csr_raw as *mut u32, wfi_state));
i2c.setup();
i2c.init();
// register a suspend/resume listener
let self_cid = xous::connect(i2c_sid).expect("couldn't create suspend callback connection");