From 302b7b65bf7b5e4e218aabd8fdc9af74a5050a48 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 23 Feb 2026 18:53:19 +0800 Subject: [PATCH] add std opcodes for ADC operations --- libs/bao1x-api/src/api.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/libs/bao1x-api/src/api.rs b/libs/bao1x-api/src/api.rs index 794964839..d3ea93384 100644 --- a/libs/bao1x-api/src/api.rs +++ b/libs/bao1x-api/src/api.rs @@ -40,6 +40,8 @@ pub enum HalOpcode { ConfigureUdmaEvent = 8, // blocking scalar UdmaIrqStatusBits = 16, + // blocking scalar + UpdatePerclk = 18, /// I2C operations I2c = 9, @@ -51,16 +53,10 @@ pub enum HalOpcode { ConfigureIoxIrq = 11, IrqLocalHandler = 12, + /// Adc operations + // blocking scalar + ReadAdcChannel = 32, + /// Manipulate the OS timer SetPreemptionState = 64, - - /// Behavior opcode base - #[cfg(feature = "bio")] - BehaviorBase0 = 0x1000, - #[cfg(feature = "bio")] - BehaviorBase1 = 0x2000, - #[cfg(feature = "bio")] - BehaviorBase2 = 0x3000, - #[cfg(feature = "bio")] - BehaviorBase3 = 0x4000, }