From db0d3c1007596049cd0c02150c63aa56bfb91c00 Mon Sep 17 00:00:00 2001 From: inesmaria08 Date: Sat, 23 Nov 2024 21:11:26 +0200 Subject: [PATCH] standardize driver ID naming to hexadecimal format --- apis/interface/buttons/src/lib.rs | 2 +- apis/interface/console/src/lib.rs | 2 +- apis/interface/leds/src/lib.rs | 2 +- apis/kernel/low_level_debug/src/lib.rs | 2 +- apis/peripherals/alarm/src/lib.rs | 2 +- apis/peripherals/gpio/src/lib.rs | 2 +- unittest/src/fake/alarm/mod.rs | 2 +- unittest/src/fake/buttons/mod.rs | 2 +- unittest/src/fake/console/mod.rs | 2 +- unittest/src/fake/gpio/mod.rs | 2 +- unittest/src/fake/leds/mod.rs | 2 +- unittest/src/fake/low_level_debug/mod.rs | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apis/interface/buttons/src/lib.rs b/apis/interface/buttons/src/lib.rs index 565970f3..76e1ee80 100644 --- a/apis/interface/buttons/src/lib.rs +++ b/apis/interface/buttons/src/lib.rs @@ -135,7 +135,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 3; +const DRIVER_NUM: u32 = 0x3; // Command IDs const BUTTONS_COUNT: u32 = 0; diff --git a/apis/interface/console/src/lib.rs b/apis/interface/console/src/lib.rs index 80404092..8e1808da 100644 --- a/apis/interface/console/src/lib.rs +++ b/apis/interface/console/src/lib.rs @@ -137,7 +137,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 1; +const DRIVER_NUM: u32 = 0x1; // Command IDs #[allow(unused)] diff --git a/apis/interface/leds/src/lib.rs b/apis/interface/leds/src/lib.rs index 6c884396..8f90e2c7 100644 --- a/apis/interface/leds/src/lib.rs +++ b/apis/interface/leds/src/lib.rs @@ -44,7 +44,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 2; +const DRIVER_NUM: u32 = 0x2; // Command IDs const LEDS_COUNT: u32 = 0; diff --git a/apis/kernel/low_level_debug/src/lib.rs b/apis/kernel/low_level_debug/src/lib.rs index 157ca2e6..8733b9a7 100644 --- a/apis/kernel/low_level_debug/src/lib.rs +++ b/apis/kernel/low_level_debug/src/lib.rs @@ -73,7 +73,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 8; +const DRIVER_NUM: u32 = 0x8; // Command IDs const EXISTS: u32 = 0; diff --git a/apis/peripherals/alarm/src/lib.rs b/apis/peripherals/alarm/src/lib.rs index 7bc1a3c5..bdb4b6d8 100644 --- a/apis/peripherals/alarm/src/lib.rs +++ b/apis/peripherals/alarm/src/lib.rs @@ -110,7 +110,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 0; +const DRIVER_NUM: u32 = 0x0; // Command IDs #[allow(unused)] diff --git a/apis/peripherals/gpio/src/lib.rs b/apis/peripherals/gpio/src/lib.rs index ae8c3c43..c7c77d0e 100644 --- a/apis/peripherals/gpio/src/lib.rs +++ b/apis/peripherals/gpio/src/lib.rs @@ -254,7 +254,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 4; +const DRIVER_NUM: u32 = 0x4; // Command IDs const EXISTS: u32 = 0; diff --git a/unittest/src/fake/alarm/mod.rs b/unittest/src/fake/alarm/mod.rs index 2b984df1..bd629e63 100644 --- a/unittest/src/fake/alarm/mod.rs +++ b/unittest/src/fake/alarm/mod.rs @@ -62,7 +62,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 0; +const DRIVER_NUM: u32 = 0x0; // Command IDs #[allow(unused)] diff --git a/unittest/src/fake/buttons/mod.rs b/unittest/src/fake/buttons/mod.rs index e0a5ec0f..2c569ded 100644 --- a/unittest/src/fake/buttons/mod.rs +++ b/unittest/src/fake/buttons/mod.rs @@ -118,7 +118,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 3; +const DRIVER_NUM: u32 = 0x3; // Command IDs const BUTTONS_COUNT: u32 = 0; diff --git a/unittest/src/fake/console/mod.rs b/unittest/src/fake/console/mod.rs index ac432e28..53939b4f 100644 --- a/unittest/src/fake/console/mod.rs +++ b/unittest/src/fake/console/mod.rs @@ -118,7 +118,7 @@ impl crate::fake::SyscallDriver for Console { #[cfg(test)] mod tests; -const DRIVER_NUM: u32 = 1; +const DRIVER_NUM: u32 = 0x1; // Command numbers const EXISTS: u32 = 0; diff --git a/unittest/src/fake/gpio/mod.rs b/unittest/src/fake/gpio/mod.rs index 387f3aa9..cdfe990e 100644 --- a/unittest/src/fake/gpio/mod.rs +++ b/unittest/src/fake/gpio/mod.rs @@ -253,7 +253,7 @@ mod tests; // Driver number and command IDs // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 4; +const DRIVER_NUM: u32 = 0x4; // Command IDs const EXISTS: u32 = 0; diff --git a/unittest/src/fake/leds/mod.rs b/unittest/src/fake/leds/mod.rs index 66c4c459..3ff6a071 100644 --- a/unittest/src/fake/leds/mod.rs +++ b/unittest/src/fake/leds/mod.rs @@ -70,7 +70,7 @@ mod tests; // Implementation details below // ----------------------------------------------------------------------------- -const DRIVER_NUM: u32 = 2; +const DRIVER_NUM: u32 = 0x2; // Command numbers const EXISTS: u32 = 0; diff --git a/unittest/src/fake/low_level_debug/mod.rs b/unittest/src/fake/low_level_debug/mod.rs index 997d47d5..43c27f57 100644 --- a/unittest/src/fake/low_level_debug/mod.rs +++ b/unittest/src/fake/low_level_debug/mod.rs @@ -69,7 +69,7 @@ impl core::fmt::Display for Message { #[cfg(test)] mod tests; -const DRIVER_NUM: u32 = 8; +const DRIVER_NUM: u32 = 0x8; // Command numbers const EXISTS: u32 = 0;