mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
api moves for I2C into its own dedicated thread
moving I2C into its own thread mitigates lockup conditions where I2C is blocking progress on e.g. gpio pin sets and interrupt handlings
This commit is contained in:
parent
ab9a724647
commit
e785257711
2 changed files with 9 additions and 3 deletions
|
|
@ -43,9 +43,6 @@ pub enum HalOpcode {
|
|||
// blocking scalar
|
||||
UpdatePerclk = 18,
|
||||
|
||||
/// I2C operations
|
||||
I2c = 9,
|
||||
|
||||
/// Peripheral reset
|
||||
PeriphReset = 10,
|
||||
|
||||
|
|
@ -69,3 +66,11 @@ pub enum PeripheralOpcode {
|
|||
ReadAdcChannel = 0x100,
|
||||
EnableChannel = 0x101,
|
||||
}
|
||||
|
||||
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
|
||||
#[repr(usize)]
|
||||
pub enum I2cOpcode {
|
||||
InvalidCall = 0,
|
||||
Transaction,
|
||||
UpdatePerclk,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ pub const SERVER_NAME_BAO1X_HAL: &str = "_bao1x-SoC HAL_";
|
|||
/// be in a separate server to avoid lock-up issues of the server depending on itself
|
||||
/// for services.
|
||||
pub const SERVER_NAME_BAO1X_OTHERS: &str = "_HAL-everthing-else_";
|
||||
pub const SERVER_NAME_BAO1X_I2C: &str = "_bao1x-i2c_";
|
||||
|
||||
/// Number of boots to trigger the 'audit' command. It's set to be bigger than 1, because
|
||||
/// the chip tester may power cycle the chip during the provisioning process before the
|
||||
|
|
|
|||
Loading…
Reference in a new issue