diff --git a/libs/bao1x-api/src/api.rs b/libs/bao1x-api/src/api.rs index d3ea93384..a305c58eb 100644 --- a/libs/bao1x-api/src/api.rs +++ b/libs/bao1x-api/src/api.rs @@ -53,10 +53,18 @@ pub enum HalOpcode { ConfigureIoxIrq = 11, IrqLocalHandler = 12, - /// Adc operations - // blocking scalar - ReadAdcChannel = 32, - /// Manipulate the OS timer SetPreemptionState = 64, } + +#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)] +#[repr(usize)] +pub enum PeripheralOpcode { + InvalidCall = 0, + UpdatePerclk = 1, + + /// Adc operations + // blocking scalar + ReadAdcChannel = 0x100, + EnableChannel = 0x101, +} diff --git a/libs/bao1x-api/src/lib.rs b/libs/bao1x-api/src/lib.rs index 55b1f573b..fd96b4671 100644 --- a/libs/bao1x-api/src/lib.rs +++ b/libs/bao1x-api/src/lib.rs @@ -49,6 +49,10 @@ pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_"; /// Do not change this constant, it is hard-coded into libraries in order to break /// circular dependencies on the IFRAM block. pub const SERVER_NAME_BAO1X_HAL: &str = "_bao1x-SoC HAL_"; +/// Server for peripherals that *also* depend on the core Bao1x HAL. These have to +/// 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_"; /// 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