1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2022.
45//! Utility functions and macros provided by the kernel crate.
67pub mod arch_helpers;
8pub mod binary_write;
9pub mod capability_ptr;
10pub mod copy_slice;
11pub mod helpers;
12pub mod leasable_buffer;
13pub mod machine_register;
14pub mod math;
15pub mod mut_imut_buffer;
16pub mod peripheral_management;
17pub mod static_init;
18pub mod storage_volume;
19pub mod streaming_process_slice;
2021mod static_ref;
22pub use self::static_ref::StaticRef;
2324/// The Tock Register Interface.
25///
26/// This is a re-export of the `tock-register-interface` crate provided for
27/// convenience.
28///
29/// The Tock Register Interface provides a mechanism for accessing hardware
30/// registers and MMIO interfaces.
31pub mod registers {
32pub use tock_registers::fields::{Field, FieldValue};
33pub use tock_registers::interfaces;
34pub use tock_registers::registers::InMemoryRegister;
35pub use tock_registers::registers::{Aliased, ReadOnly, ReadWrite, WriteOnly};
36pub use tock_registers::{register_bitfields, register_structs};
37pub use tock_registers::{LocalRegisterCopy, RegisterLongName};
38}
3940/// The Tock `Cell` types.
41///
42/// This is a re-export of the `tock-cells` crate provided for convenience.
43///
44/// To use `TakeCell`, for example, users should use:
45///
46/// use kernel::utilities::cells::TakeCell;
47pub mod cells {
48pub use tock_cells::map_cell::MapCell;
49pub use tock_cells::numeric_cell_ext::NumericCellExt;
50pub use tock_cells::optional_cell::OptionalCell;
51pub use tock_cells::take_cell::TakeCell;
52pub use tock_cells::volatile_cell::VolatileCell;
53}