Address presubmit issues
diff --git a/target/ast10x0/peripherals/BUILD.bazel b/target/ast10x0/peripherals/BUILD.bazel index ee911c5..2a498bf 100644 --- a/target/ast10x0/peripherals/BUILD.bazel +++ b/target/ast10x0/peripherals/BUILD.bazel
@@ -9,7 +9,6 @@ rust_library( name = "peripherals", srcs = [ - "lib.rs", "i2c/constants.rs", "i2c/controller.rs", "i2c/error.rs", @@ -23,18 +22,22 @@ "i2c/timing.rs", "i2c/transfer.rs", "i2c/types.rs", - "scu/mod.rs", - "scu/registers.rs", - "scu/types.rs", - "scu/reset.rs", + "lib.rs", "scu/clock.rs", - "scu/status.rs", + "scu/mod.rs", "scu/pinctrl.rs", + "scu/registers.rs", + "scu/reset.rs", + "scu/status.rs", + "scu/types.rs", "uart/mod.rs", ], crate_name = "ast10x0_peripherals", crate_root = "lib.rs", edition = "2024", + proc_macro_deps = [ + "@rust_crates//:paste", + ], target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ "@ast1060_pac", @@ -44,7 +47,4 @@ "@rust_crates//:embedded-io", "@rust_crates//:nb", ], - proc_macro_deps = [ - "@rust_crates//:paste", - ], )
diff --git a/target/ast10x0/peripherals/i2c/constants.rs b/target/ast10x0/peripherals/i2c/constants.rs index 67dd863..b2bd6b9 100644 --- a/target/ast10x0/peripherals/i2c/constants.rs +++ b/target/ast10x0/peripherals/i2c/constants.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Hardware constants for AST1060 I2C controller //!
diff --git a/target/ast10x0/peripherals/i2c/controller.rs b/target/ast10x0/peripherals/i2c/controller.rs index 4a6d48f..dbff8d9 100644 --- a/target/ast10x0/peripherals/i2c/controller.rs +++ b/target/ast10x0/peripherals/i2c/controller.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! AST1060 I2C controller implementation
diff --git a/target/ast10x0/peripherals/i2c/error.rs b/target/ast10x0/peripherals/i2c/error.rs index 304f921..578fccc 100644 --- a/target/ast10x0/peripherals/i2c/error.rs +++ b/target/ast10x0/peripherals/i2c/error.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Core error types without OS dependencies
diff --git a/target/ast10x0/peripherals/i2c/global.rs b/target/ast10x0/peripherals/i2c/global.rs index 3b0e0d5..421d274 100644 --- a/target/ast10x0/peripherals/i2c/global.rs +++ b/target/ast10x0/peripherals/i2c/global.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! I2C global hardware initialization utility //!
diff --git a/target/ast10x0/peripherals/i2c/hal_impl.rs b/target/ast10x0/peripherals/i2c/hal_impl.rs index 604bcd2..f9f7daf 100644 --- a/target/ast10x0/peripherals/i2c/hal_impl.rs +++ b/target/ast10x0/peripherals/i2c/hal_impl.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! embedded-hal trait implementations for AST1060 I2C driver //!
diff --git a/target/ast10x0/peripherals/i2c/master.rs b/target/ast10x0/peripherals/i2c/master.rs index d473981..238a3eb 100644 --- a/target/ast10x0/peripherals/i2c/master.rs +++ b/target/ast10x0/peripherals/i2c/master.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Master mode operations //!
diff --git a/target/ast10x0/peripherals/i2c/mod.rs b/target/ast10x0/peripherals/i2c/mod.rs index 583f3d6..8484598 100644 --- a/target/ast10x0/peripherals/i2c/mod.rs +++ b/target/ast10x0/peripherals/i2c/mod.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! AST1060 I2C bare-metal driver core //!
diff --git a/target/ast10x0/peripherals/i2c/recovery.rs b/target/ast10x0/peripherals/i2c/recovery.rs index 0ebdc96..ca4797a 100644 --- a/target/ast10x0/peripherals/i2c/recovery.rs +++ b/target/ast10x0/peripherals/i2c/recovery.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Bus recovery implementation
diff --git a/target/ast10x0/peripherals/i2c/slave.rs b/target/ast10x0/peripherals/i2c/slave.rs index f969e26..729c825 100644 --- a/target/ast10x0/peripherals/i2c/slave.rs +++ b/target/ast10x0/peripherals/i2c/slave.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! AST1060 I2C Slave/Target Mode Implementation //!
diff --git a/target/ast10x0/peripherals/i2c/target_adapter.rs b/target/ast10x0/peripherals/i2c/target_adapter.rs index 14b438a..847d852 100644 --- a/target/ast10x0/peripherals/i2c/target_adapter.rs +++ b/target/ast10x0/peripherals/i2c/target_adapter.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! I2C Target (Slave) Adapter //!
diff --git a/target/ast10x0/peripherals/i2c/timing.rs b/target/ast10x0/peripherals/i2c/timing.rs index 3e93030..ddcc789 100644 --- a/target/ast10x0/peripherals/i2c/timing.rs +++ b/target/ast10x0/peripherals/i2c/timing.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Timing configuration for I2C //!
diff --git a/target/ast10x0/peripherals/i2c/transfer.rs b/target/ast10x0/peripherals/i2c/transfer.rs index 5610034..d793c1f 100644 --- a/target/ast10x0/peripherals/i2c/transfer.rs +++ b/target/ast10x0/peripherals/i2c/transfer.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Transfer mode implementation //!
diff --git a/target/ast10x0/peripherals/i2c/types.rs b/target/ast10x0/peripherals/i2c/types.rs index 4a7519b..5d2063f 100644 --- a/target/ast10x0/peripherals/i2c/types.rs +++ b/target/ast10x0/peripherals/i2c/types.rs
@@ -1,4 +1,5 @@ // Licensed under the Apache-2.0 license +// SPDX-License-Identifier: Apache-2.0 //! Core types for AST1060 I2C driver //!
diff --git a/target/ast10x0/tests/peripherals/i2c/BUILD.bazel b/target/ast10x0/tests/peripherals/i2c/BUILD.bazel index 37f4531..9747f7c 100644 --- a/target/ast10x0/tests/peripherals/i2c/BUILD.bazel +++ b/target/ast10x0/tests/peripherals/i2c/BUILD.bazel
@@ -62,8 +62,8 @@ ":codegen", ":linker_script", "//target/ast10x0:config", - "//target/ast10x0/board:ast10x0_board", "//target/ast10x0:entry", + "//target/ast10x0/board:ast10x0_board", "//target/ast10x0/peripherals", "@ast1060_pac", "@pigweed//pw_kernel/arch/arm_cortex_m:arch_arm_cortex_m",