mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
configure the IRQ input
This commit is contained in:
parent
86afe7ca0a
commit
68759073ef
1 changed files with 12 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ pub fn setup_memory_pins(iox: &dyn IoSetup) -> crate::udma::SpimChannel {
|
|||
crate::udma::SpimChannel::Channel1
|
||||
}
|
||||
|
||||
/// This also sets up I2C-adjacent interrupt inputs as well
|
||||
pub fn setup_i2c_pins(iox: &dyn IoSetup) -> crate::udma::I2cChannel {
|
||||
// I2C_SCL_B[0]
|
||||
iox.setup_pin(
|
||||
|
|
@ -173,6 +174,17 @@ pub fn setup_i2c_pins(iox: &dyn IoSetup) -> crate::udma::I2cChannel {
|
|||
Some(IoxEnable::Enable),
|
||||
Some(IoxDriveStrength::Drive2mA),
|
||||
);
|
||||
// PB13 -> PMIC IRQ
|
||||
iox.setup_pin(
|
||||
IoxPort::PB,
|
||||
13,
|
||||
Some(IoxDir::Input),
|
||||
Some(IoxFunction::Gpio),
|
||||
Some(IoxEnable::Enable),
|
||||
Some(IoxEnable::Enable),
|
||||
None,
|
||||
None,
|
||||
);
|
||||
crate::udma::I2cChannel::Channel0
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue