From 5dd94146d116f50c09c6b2ebc86edd8269f52f86 Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Tue, 28 May 2024 19:16:59 -0400 Subject: [PATCH 1/2] ci-job-capsules: test capsules/{core,extra} instead of full workspace By running `cargo test` in /capsules, Cargo tests every crate in the Workspace, slowing down CI unnecessarily in this step. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e85a32f9f..f49c459493 100644 --- a/Makefile +++ b/Makefile @@ -465,7 +465,8 @@ ci-job-kernel: ci-job-capsules: $(call banner,CI-Job: Capsules) @# Capsule initialization depends on board/chip specific imports, so ignore doc tests - @cd capsules && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test --lib --examples + @cd capsules/core && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test --lib --examples + @cd capsules/extra && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test --lib --examples .PHONY: ci-job-chips ci-job-chips: From 7f3d770762845ce46221aff23ca12c2fa5ee2d48 Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Tue, 28 May 2024 19:18:37 -0400 Subject: [PATCH 2/2] capsules: ignore broken doctests, enable doctests for ci-job-capsules By ignoring each (deliberately) broken doctest individually, we allow developers to use `cargo test` on the full crate to debug custom tests. Otherwise it is opaque how `ci-job-capsules` can pass, despite `cargo test` failing. Furthermore, this allows us to add actual, working doctests in the future. --- Makefile | 5 +++-- capsules/core/src/adc.rs | 12 ++++++------ capsules/core/src/button.rs | 6 +++--- capsules/core/src/console.rs | 4 ++-- capsules/core/src/console_ordered.rs | 2 +- capsules/core/src/gpio.rs | 6 +++--- capsules/core/src/led.rs | 6 +++--- capsules/core/src/rng.rs | 2 +- capsules/core/src/stream.rs | 10 +++++----- capsules/core/src/test/capsule_test.rs | 2 +- capsules/core/src/virtualizers/virtual_aes_ccm.rs | 6 +++--- capsules/core/src/virtualizers/virtual_flash.rs | 10 +++++----- capsules/core/src/virtualizers/virtual_pwm.rs | 10 +++++----- capsules/core/src/virtualizers/virtual_uart.rs | 14 +++++++------- capsules/extra/src/air_quality.rs | 2 +- capsules/extra/src/ambient_light.rs | 2 +- capsules/extra/src/analog_comparator.rs | 2 +- capsules/extra/src/apds9960.rs | 2 +- capsules/extra/src/app_flash_driver.rs | 2 +- capsules/extra/src/at24c_eeprom.rs | 2 +- capsules/extra/src/ble_advertising_driver.rs | 2 +- capsules/extra/src/bmm150.rs | 2 +- capsules/extra/src/bus.rs | 4 ++-- capsules/extra/src/buzzer_driver.rs | 2 +- capsules/extra/src/buzzer_pwm.rs | 2 +- capsules/extra/src/can.rs | 2 +- capsules/extra/src/crc.rs | 4 ++-- capsules/extra/src/dac.rs | 2 +- capsules/extra/src/date_time.rs | 2 +- capsules/extra/src/debug_process_restart.rs | 2 +- capsules/extra/src/fm25cl.rs | 2 +- capsules/extra/src/ft6x06.rs | 2 +- capsules/extra/src/fxos8700cq.rs | 2 +- capsules/extra/src/gpio_async.rs | 2 +- capsules/extra/src/hd44780.rs | 2 +- capsules/extra/src/hmac.rs | 2 +- capsules/extra/src/hs3003.rs | 2 +- capsules/extra/src/hts221.rs | 2 +- capsules/extra/src/humidity.rs | 2 +- capsules/extra/src/ieee802154/framer.rs | 6 +++--- capsules/extra/src/ieee802154/virtual_mac.rs | 2 +- capsules/extra/src/ieee802154/xmac.rs | 2 +- capsules/extra/src/isl29035.rs | 2 +- capsules/extra/src/kv_driver.rs | 2 +- capsules/extra/src/kv_store_permissions.rs | 2 +- capsules/extra/src/l3gd20.rs | 6 +++--- capsules/extra/src/led_matrix.rs | 2 +- capsules/extra/src/log.rs | 2 +- capsules/extra/src/lps22hb.rs | 2 +- capsules/extra/src/lps25hb.rs | 2 +- capsules/extra/src/lsm303agr.rs | 6 +++--- capsules/extra/src/lsm303dlhc.rs | 6 +++--- capsules/extra/src/ltc294x.rs | 2 +- capsules/extra/src/max17205.rs | 2 +- capsules/extra/src/mcp230xx.rs | 2 +- capsules/extra/src/mlx90614.rs | 2 +- capsules/extra/src/mx25r6435f.rs | 4 ++-- capsules/extra/src/net/stream.rs | 4 ++-- capsules/extra/src/ninedof.rs | 2 +- capsules/extra/src/nonvolatile_storage_driver.rs | 2 +- capsules/extra/src/nonvolatile_to_pages.rs | 2 +- capsules/extra/src/nrf51822_serialization.rs | 2 +- capsules/extra/src/panic_button.rs | 2 +- capsules/extra/src/pca9544a.rs | 2 +- capsules/extra/src/pressure.rs | 2 +- capsules/extra/src/proximity.rs | 2 +- capsules/extra/src/screen.rs | 2 +- capsules/extra/src/screen_shared.rs | 2 +- capsules/extra/src/sdcard.rs | 2 +- capsules/extra/src/segger_rtt.rs | 4 ++-- capsules/extra/src/seven_segment.rs | 2 +- capsules/extra/src/sha.rs | 2 +- capsules/extra/src/si7021.rs | 2 +- capsules/extra/src/sound_pressure.rs | 2 +- capsules/extra/src/st77xx.rs | 2 +- capsules/extra/src/temperature.rs | 2 +- capsules/extra/src/test/kv_system.rs | 2 +- capsules/extra/src/text_screen.rs | 2 +- capsules/extra/src/tickv.rs | 2 +- capsules/extra/src/tickv_kv_store.rs | 2 +- capsules/extra/src/touch.rs | 2 +- capsules/extra/src/usb/usb_user.rs | 2 +- capsules/extra/src/usb/usbc_client_ctrl.rs | 2 +- capsules/extra/src/virtual_kv.rs | 2 +- 84 files changed, 131 insertions(+), 130 deletions(-) diff --git a/Makefile b/Makefile index f49c459493..d10a28e0d7 100644 --- a/Makefile +++ b/Makefile @@ -465,8 +465,9 @@ ci-job-kernel: ci-job-capsules: $(call banner,CI-Job: Capsules) @# Capsule initialization depends on board/chip specific imports, so ignore doc tests - @cd capsules/core && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test --lib --examples - @cd capsules/extra && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test --lib --examples + @cd capsules/core && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test + @cd capsules/extra && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test + @cd capsules/system && NOWARNINGS=true RUSTFLAGS="-D warnings" TOCK_KERNEL_VERSION=ci_test cargo test .PHONY: ci-job-chips ci-job-chips: diff --git a/capsules/core/src/adc.rs b/capsules/core/src/adc.rs index 18b20350ed..d4b8833600 100644 --- a/capsules/core/src/adc.rs +++ b/capsules/core/src/adc.rs @@ -25,7 +25,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let adc_channels = static_init!( @@ -40,13 +40,13 @@ //! ] //! ); //! let adc = static_init!( -//! capsules::adc::AdcDedicated<'static, sam4l::adc::Adc>, -//! capsules::adc::AdcDedicated::new( +//! capsules_core::adc::AdcDedicated<'static, sam4l::adc::Adc>, +//! capsules_core::adc::AdcDedicated::new( //! &mut sam4l::adc::ADC0, //! adc_channels, -//! &mut capsules::adc::ADC_BUFFER1, -//! &mut capsules::adc::ADC_BUFFER2, -//! &mut capsules::adc::ADC_BUFFER3 +//! &mut capsules_core::adc::ADC_BUFFER1, +//! &mut capsules_core::adc::ADC_BUFFER2, +//! &mut capsules_core::adc::ADC_BUFFER3 //! ) //! ); //! sam4l::adc::ADC0.set_client(adc); diff --git a/capsules/core/src/button.rs b/capsules/core/src/button.rs index 62a4ac71b9..31f4a38983 100644 --- a/capsules/core/src/button.rs +++ b/capsules/core/src/button.rs @@ -11,15 +11,15 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let button_pins = static_init!( //! [&'static sam4l::gpio::GPIOPin; 1], //! [&sam4l::gpio::PA[16]]); //! let button = static_init!( -//! capsules::button::Button<'static>, -//! capsules::button::Button::new(button_pins, board_kernel.create_grant(&grant_cap))); +//! capsules_core::button::Button<'static>, +//! capsules_core::button::Button::new(button_pins, board_kernel.create_grant(&grant_cap))); //! for btn in button_pins.iter() { //! btn.set_client(button); //! } diff --git a/capsules/core/src/console.rs b/capsules/core/src/console.rs index 609588e759..7b3f30b772 100644 --- a/capsules/core/src/console.rs +++ b/capsules/core/src/console.rs @@ -9,9 +9,9 @@ //! //! You need a device that provides the `hil::uart::UART` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; -//! # use capsules::console::Console; +//! # use capsules_core::console::Console; //! //! let console = static_init!( //! Console, diff --git a/capsules/core/src/console_ordered.rs b/capsules/core/src/console_ordered.rs index 4bb62beaad..6161493f7b 100644 --- a/capsules/core/src/console_ordered.rs +++ b/capsules/core/src/console_ordered.rs @@ -40,7 +40,7 @@ //! reasonable. ATOMIC_SIZE should be at least 80 (row width //! of a standard console). //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules_core::console_ordered::ConsoleOrdered; //! let console = static_init!( diff --git a/capsules/core/src/gpio.rs b/capsules/core/src/gpio.rs index 9569e51d0d..8c40a8bc39 100644 --- a/capsules/core/src/gpio.rs +++ b/capsules/core/src/gpio.rs @@ -15,7 +15,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let gpio_pins = static_init!( @@ -25,8 +25,8 @@ //! Option<&sam4l::gpio::PB[11]>, //! Option<&sam4l::gpio::PB[12]>]); //! let gpio = static_init!( -//! capsules::gpio::GPIO<'static, sam4l::gpio::GPIOPin>, -//! capsules::gpio::GPIO::new(gpio_pins)); +//! capsules_core::gpio::GPIO<'static, sam4l::gpio::GPIOPin>, +//! capsules_core::gpio::GPIO::new(gpio_pins)); //! for maybe_pin in gpio_pins.iter() { //! if let Some(pin) = maybe_pin { //! pin.set_client(gpio); diff --git a/capsules/core/src/led.rs b/capsules/core/src/led.rs index 3d9f078c88..9f0d0edc44 100644 --- a/capsules/core/src/led.rs +++ b/capsules/core/src/led.rs @@ -16,7 +16,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let led_pins = static_init!( @@ -25,8 +25,8 @@ //! (&sam4l::gpio::PA[15], kernel::hil::gpio::ActivationMode::ActiveLow), // Green //! (&sam4l::gpio::PA[14], kernel::hil::gpio::ActivationMode::ActiveLow)]); // Blue //! let led = static_init!( -//! capsules::led::LED<'static, sam4l::gpio::GPIOPin>, -//! capsules::led::LED::new(led_pins)); +//! capsules_core::led::LED<'static, sam4l::gpio::GPIOPin>, +//! capsules_core::led::LED::new(led_pins)); //! ``` //! //! Syscall Interface diff --git a/capsules/core/src/rng.rs b/capsules/core/src/rng.rs index 41d5ab2f29..ce378b3d52 100644 --- a/capsules/core/src/rng.rs +++ b/capsules/core/src/rng.rs @@ -14,7 +14,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let rng = static_init!( diff --git a/capsules/core/src/stream.rs b/capsules/core/src/stream.rs index 40a484aa6c..6f0e36ae8c 100644 --- a/capsules/core/src/stream.rs +++ b/capsules/core/src/stream.rs @@ -135,9 +135,9 @@ macro_rules! stream_from_option { /// would result in it defaulting to 0. Idiomatically, the way to combine /// encoders is to define another encoder as follows: /// -/// ```rust -/// # use capsules::{enc_try, stream_done}; -/// # use capsules::net::stream::SResult; +/// ```rust,ignore +/// # use capsules_core::{enc_try, stream_done}; +/// # use capsules_core::stream::{SResult}; /// /// // call a simple encoder /// let (bytes, out1) = enc_try!(buf; encoder1); @@ -157,8 +157,8 @@ macro_rules! stream_from_option { /// /// Then, using an encoder can be done simply by: /// -/// ``` -/// # use capsules::net::stream::SResult; +/// ```rust,ignore +/// # use capsules_core::stream::SResult; /// /// match encoder(&mut buf) { /// SResult::Done(off, out) => { /* celebrate */ } diff --git a/capsules/core/src/test/capsule_test.rs b/capsules/core/src/test/capsule_test.rs index 25d2ead5de..7bc59b9b22 100644 --- a/capsules/core/src/test/capsule_test.rs +++ b/capsules/core/src/test/capsule_test.rs @@ -11,7 +11,7 @@ //! //! A simple example of a test capsule using this interface: //! -//! ```rust +//! ```rust,ignore //! pub struct TestSensorX { //! client: OptionalCell<&'static dyn CapsuleTestClient>, //! } diff --git a/capsules/core/src/virtualizers/virtual_aes_ccm.rs b/capsules/core/src/virtualizers/virtual_aes_ccm.rs index 9c6032ef60..d1533f65ef 100644 --- a/capsules/core/src/virtualizers/virtual_aes_ccm.rs +++ b/capsules/core/src/virtualizers/virtual_aes_ccm.rs @@ -43,9 +43,9 @@ //! Usage //! ----- //! -//! ```rust -//! # use capsules::test::aes_ccm::Test; -//! # use capsules::virtual_aes_ccm; +//! ```rust,ignore +//! # use capsules_core::test::aes_ccm::Test; +//! # use capsules_core::virtual_aes_ccm; //! # use kernel::common::deferred_call::DeferredCallClient; //! # use kernel::hil::symmetric_encryption::{AES128, AES128CCM, AES128_BLOCK_SIZE}; //! # use kernel::static_init; diff --git a/capsules/core/src/virtualizers/virtual_flash.rs b/capsules/core/src/virtualizers/virtual_flash.rs index ea3993ecf5..26e4b4c3b0 100644 --- a/capsules/core/src/virtualizers/virtual_flash.rs +++ b/capsules/core/src/virtualizers/virtual_flash.rs @@ -15,19 +15,19 @@ //! Usage //! ----- //! -//! ``` +//! ```rust,ignore //! # use kernel::{hil, static_init}; //! //! // Create the mux. //! let mux_flash = static_init!( -//! capsules::virtual_flash::MuxFlash<'static, sam4l::flashcalw::FLASHCALW>, -//! capsules::virtual_flash::MuxFlash::new(&sam4l::flashcalw::FLASH_CONTROLLER)); +//! capsules_core::virtual_flash::MuxFlash<'static, sam4l::flashcalw::FLASHCALW>, +//! capsules_core::virtual_flash::MuxFlash::new(&sam4l::flashcalw::FLASH_CONTROLLER)); //! hil::flash::HasClient::set_client(&sam4l::flashcalw::FLASH_CONTROLLER, mux_flash); //! //! // Everything that then uses the virtualized flash must use one of these. //! let virtual_flash = static_init!( -//! capsules::virtual_flash::FlashUser<'static, sam4l::flashcalw::FLASHCALW>, -//! capsules::virtual_flash::FlashUser::new(mux_flash)); +//! capsules_core::virtual_flash::FlashUser<'static, sam4l::flashcalw::FLASHCALW>, +//! capsules_core::virtual_flash::FlashUser::new(mux_flash)); //! ``` use core::cell::Cell; diff --git a/capsules/core/src/virtualizers/virtual_pwm.rs b/capsules/core/src/virtualizers/virtual_pwm.rs index e554e075ef..e1c4d68514 100644 --- a/capsules/core/src/virtualizers/virtual_pwm.rs +++ b/capsules/core/src/virtualizers/virtual_pwm.rs @@ -10,16 +10,16 @@ //! Usage //! ----- //! -//! ``` +//! ```rust,ignore //! # use kernel::static_init; //! //! let mux_pwm = static_init!( -//! capsules::virtual_pwm::MuxPwm<'static, nrf52::pwm::Pwm>, -//! capsules::virtual_pwm::MuxPwm::new(&base_peripherals.pwm0) +//! capsules_core::virtual_pwm::MuxPwm<'static, nrf52::pwm::Pwm>, +//! capsules_core::virtual_pwm::MuxPwm::new(&base_peripherals.pwm0) //! ); //! let virtual_pwm_buzzer = static_init!( -//! capsules::virtual_pwm::PwmPinUser<'static, nrf52::pwm::Pwm>, -//! capsules::virtual_pwm::PwmPinUser::new(mux_pwm, nrf5x::pinmux::Pinmux::new(31)) +//! capsules_core::virtual_pwm::PwmPinUser<'static, nrf52::pwm::Pwm>, +//! capsules_core::virtual_pwm::PwmPinUser::new(mux_pwm, nrf5x::pinmux::Pinmux::new(31)) //! ); //! virtual_pwm_buzzer.add_to_mux(); //! ``` diff --git a/capsules/core/src/virtualizers/virtual_uart.rs b/capsules/core/src/virtualizers/virtual_uart.rs index d96cd19e59..1dff12d7ad 100644 --- a/capsules/core/src/virtualizers/virtual_uart.rs +++ b/capsules/core/src/virtualizers/virtual_uart.rs @@ -17,14 +17,14 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::{hil, static_init}; -//! # use capsules::virtual_uart::{MuxUart, UartDevice}; +//! # use capsules_core::virtual_uart::{MuxUart, UartDevice}; //! //! // Create a shared UART channel for the console and for kernel debug. //! let uart_mux = static_init!( //! MuxUart<'static>, -//! MuxUart::new(&sam4l::usart::USART0, &mut capsules::virtual_uart::RX_BUF) +//! MuxUart::new(&sam4l::usart::USART0, &mut capsules_core::virtual_uart::RX_BUF) //! ); //! hil::uart::UART::set_receive_client(&sam4l::usart::USART0, uart_mux); //! hil::uart::UART::set_transmit_client(&sam4l::usart::USART0, uart_mux); @@ -33,11 +33,11 @@ //! let console_uart = static_init!(UartDevice, UartDevice::new(uart_mux, true)); //! console_uart.setup(); // This is important! //! let console = static_init!( -//! capsules::console::Console<'static>, -//! capsules::console::Console::new( +//! capsules_core::console::Console<'static>, +//! capsules_core::console::Console::new( //! console_uart, -//! &mut capsules::console::WRITE_BUF, -//! &mut capsules::console::READ_BUF, +//! &mut capsules_core::console::WRITE_BUF, +//! &mut capsules_core::console::READ_BUF, //! board_kernel.create_grant(&grant_cap) //! ) //! ); diff --git a/capsules/extra/src/air_quality.rs b/capsules/extra/src/air_quality.rs index 95391c6ebb..81fc5f443c 100644 --- a/capsules/extra/src/air_quality.rs +++ b/capsules/extra/src/air_quality.rs @@ -9,7 +9,7 @@ //! //! You need a device that provides the `hil::sensors::AirQualityDriver` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); diff --git a/capsules/extra/src/ambient_light.rs b/capsules/extra/src/ambient_light.rs index c36e3a13b8..b00025263b 100644 --- a/capsules/extra/src/ambient_light.rs +++ b/capsules/extra/src/ambient_light.rs @@ -6,7 +6,7 @@ //! //! You need a device that provides the `hil::sensors::AmbientLight` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::{hil, static_init}; //! //! let light = static_init!( diff --git a/capsules/extra/src/analog_comparator.rs b/capsules/extra/src/analog_comparator.rs index 078cd9d75b..f39c5900c7 100644 --- a/capsules/extra/src/analog_comparator.rs +++ b/capsules/extra/src/analog_comparator.rs @@ -7,7 +7,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let ac_channels = static_init!( diff --git a/capsules/extra/src/apds9960.rs b/capsules/extra/src/apds9960.rs index fba24040a8..8edb99c1ef 100644 --- a/capsules/extra/src/apds9960.rs +++ b/capsules/extra/src/apds9960.rs @@ -17,7 +17,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let apds9960_i2c = static_init!( //! capsules::virtual_i2c::I2CDevice, //! capsules::virtual_i2c::I2CDevice::new(sensors_i2c_bus, 0x39) diff --git a/capsules/extra/src/app_flash_driver.rs b/capsules/extra/src/app_flash_driver.rs index a0e95e2b4b..4cacbad7c4 100644 --- a/capsules/extra/src/app_flash_driver.rs +++ b/capsules/extra/src/app_flash_driver.rs @@ -16,7 +16,7 @@ //! Usage //! ----- //! -//! ``` +//! ```rust,ignore //! # use kernel::static_init; //! //! let app_flash_buffer = static_init!([u8; 512], [0; 512]); diff --git a/capsules/extra/src/at24c_eeprom.rs b/capsules/extra/src/at24c_eeprom.rs index 8403d72bf0..002fee5946 100644 --- a/capsules/extra/src/at24c_eeprom.rs +++ b/capsules/extra/src/at24c_eeprom.rs @@ -19,7 +19,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let i2cmux = I2CMuxComponent::new(i2c0, None).finalize(components::i2c_mux_component_static!()); //! //! let at24c_buffer = static_init!([u8; 34], [0; 34]); diff --git a/capsules/extra/src/ble_advertising_driver.rs b/capsules/extra/src/ble_advertising_driver.rs index 439bed307d..d13baf1013 100644 --- a/capsules/extra/src/ble_advertising_driver.rs +++ b/capsules/extra/src/ble_advertising_driver.rs @@ -67,7 +67,7 @@ //! You need a device that provides the `kernel::BleAdvertisementDriver` trait along with a virtual //! timer to perform events and not block the entire kernel //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! diff --git a/capsules/extra/src/bmm150.rs b/capsules/extra/src/bmm150.rs index 561864ec2e..589e45a0ff 100644 --- a/capsules/extra/src/bmm150.rs +++ b/capsules/extra/src/bmm150.rs @@ -24,7 +24,7 @@ //! //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let bmm150_i2c = static_init!( diff --git a/capsules/extra/src/bus.rs b/capsules/extra/src/bus.rs index 77326f83d2..613dbed012 100644 --- a/capsules/extra/src/bus.rs +++ b/capsules/extra/src/bus.rs @@ -9,13 +9,13 @@ //! ----- //! //! I2C example -//! ```rust +//! ```rust,ignore //! let bus = components::bus::I2CMasterBusComponent::new(i2c_mux, address) //! .finalize(components::spi_bus_component_helper!()); //! ``` //! //! SPI example -//! ```rust +//! ```rust,ignore //! let bus = //! components::bus::SpiMasterBusComponent::new().finalize(components::spi_bus_component_helper!( //! // spi type diff --git a/capsules/extra/src/buzzer_driver.rs b/capsules/extra/src/buzzer_driver.rs index 329f4eca11..a31b0b5d20 100644 --- a/capsules/extra/src/buzzer_driver.rs +++ b/capsules/extra/src/buzzer_driver.rs @@ -15,7 +15,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let virtual_pwm_buzzer = static_init!( diff --git a/capsules/extra/src/buzzer_pwm.rs b/capsules/extra/src/buzzer_pwm.rs index 2c2c3ca865..7d6f0192bb 100644 --- a/capsules/extra/src/buzzer_pwm.rs +++ b/capsules/extra/src/buzzer_pwm.rs @@ -9,7 +9,7 @@ //! Instantiate the capsule for use as a service capsule, using a virtual pwm buzzer //! and a virtual alarm. For example: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let mux_pwm = static_init!( diff --git a/capsules/extra/src/can.rs b/capsules/extra/src/can.rs index 29db2eefc6..9cb5418d93 100644 --- a/capsules/extra/src/can.rs +++ b/capsules/extra/src/can.rs @@ -32,7 +32,7 @@ //! ----- //! //! You need a driver that implements the Can trait. -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_can = self.board_kernel.create_grant( //! capsules::can::CanCapsule::DRIVER_NUM, &grant_cap); diff --git a/capsules/extra/src/crc.rs b/capsules/extra/src/crc.rs index 3e600b65b9..f8b31ac6ab 100644 --- a/capsules/extra/src/crc.rs +++ b/capsules/extra/src/crc.rs @@ -11,7 +11,7 @@ //! client of the hardware implementation. For example, using the SAM4L's `CrcU` //! driver: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let crc_buffer = static_init!([u8; 64], [0; 64]); @@ -131,7 +131,7 @@ impl<'a, C: Crc<'a>> CrcDriver<'a, C> { /// /// ## Example /// - /// ```rust + /// ```rust,ignore /// capsules::crc::Crc::new(&sam4l::crccu::CrcCU, board_kernel.create_grant(&grant_cap)); /// ``` /// diff --git a/capsules/extra/src/dac.rs b/capsules/extra/src/dac.rs index 1466fba93d..f9d093a1cf 100644 --- a/capsules/extra/src/dac.rs +++ b/capsules/extra/src/dac.rs @@ -7,7 +7,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let dac = static_init!( diff --git a/capsules/extra/src/date_time.rs b/capsules/extra/src/date_time.rs index 08d6efb984..b498cd7568 100644 --- a/capsules/extra/src/date_time.rs +++ b/capsules/extra/src/date_time.rs @@ -12,7 +12,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let grant_dt = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_date_time = board_kernel.create_grant(capsules::date_time::DRIVER_NUM, &grant_dt); //! diff --git a/capsules/extra/src/debug_process_restart.rs b/capsules/extra/src/debug_process_restart.rs index 875aaf8f2a..b435be42dd 100644 --- a/capsules/extra/src/debug_process_restart.rs +++ b/capsules/extra/src/debug_process_restart.rs @@ -10,7 +10,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::{capabilities, static_init}; //! //! struct ProcessMgmtCap; diff --git a/capsules/extra/src/fm25cl.rs b/capsules/extra/src/fm25cl.rs index 8e3fe35622..b868087b28 100644 --- a/capsules/extra/src/fm25cl.rs +++ b/capsules/extra/src/fm25cl.rs @@ -18,7 +18,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // Create a SPI device for this chip. diff --git a/capsules/extra/src/ft6x06.rs b/capsules/extra/src/ft6x06.rs index 93cccbab86..0631da4a22 100644 --- a/capsules/extra/src/ft6x06.rs +++ b/capsules/extra/src/ft6x06.rs @@ -11,7 +11,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let mux_i2c = components::i2c::I2CMuxComponent::new(&stm32f4xx::i2c::I2C1) //! .finalize(components::i2c_mux_component_helper!()); //! diff --git a/capsules/extra/src/fxos8700cq.rs b/capsules/extra/src/fxos8700cq.rs index 0319e538c2..df314c8d01 100644 --- a/capsules/extra/src/fxos8700cq.rs +++ b/capsules/extra/src/fxos8700cq.rs @@ -12,7 +12,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let fxos8700_i2c = static_init!(I2CDevice, I2CDevice::new(i2c_bus, 0x1e)); diff --git a/capsules/extra/src/gpio_async.rs b/capsules/extra/src/gpio_async.rs index da29a7347d..eedbfcb7fb 100644 --- a/capsules/extra/src/gpio_async.rs +++ b/capsules/extra/src/gpio_async.rs @@ -11,7 +11,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // Generate a list of ports to group into one userspace driver. diff --git a/capsules/extra/src/hd44780.rs b/capsules/extra/src/hd44780.rs index 631488d1b5..a3c49fedc4 100644 --- a/capsules/extra/src/hd44780.rs +++ b/capsules/extra/src/hd44780.rs @@ -27,7 +27,7 @@ //! Usage //! ----- -//! ```rust +//! ```rust,ignore //! let lcd = components::hd44780::HD44780Component::new(mux_alarm).finalize( //! components::hd44780_component_helper!( //! stm32f429zi::tim2::Tim2, diff --git a/capsules/extra/src/hmac.rs b/capsules/extra/src/hmac.rs index 887fea49c0..fb34322fa3 100644 --- a/capsules/extra/src/hmac.rs +++ b/capsules/extra/src/hmac.rs @@ -7,7 +7,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let hmac = &earlgrey::hmac::HMAC; //! //! let mux_hmac = static_init!(MuxHmac<'static, lowrisc::hmac::Hmac>, MuxHmac::new(hmac)); diff --git a/capsules/extra/src/hs3003.rs b/capsules/extra/src/hs3003.rs index 2314b8d384..06737a460c 100644 --- a/capsules/extra/src/hs3003.rs +++ b/capsules/extra/src/hs3003.rs @@ -35,7 +35,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let hs3003_i2c = static_init!( diff --git a/capsules/extra/src/hts221.rs b/capsules/extra/src/hts221.rs index 29a9498c74..071cbe085c 100644 --- a/capsules/extra/src/hts221.rs +++ b/capsules/extra/src/hts221.rs @@ -55,7 +55,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let hts221_i2c = static_init!( diff --git a/capsules/extra/src/humidity.rs b/capsules/extra/src/humidity.rs index 2c1cb7a401..e3b2ef46da 100644 --- a/capsules/extra/src/humidity.rs +++ b/capsules/extra/src/humidity.rs @@ -41,7 +41,7 @@ //! //! You need a device that provides the `hil::sensors::HumidityDriver` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let humidity = static_init!( diff --git a/capsules/extra/src/ieee802154/framer.rs b/capsules/extra/src/ieee802154/framer.rs index 2f3bfdc798..64447fd999 100644 --- a/capsules/extra/src/ieee802154/framer.rs +++ b/capsules/extra/src/ieee802154/framer.rs @@ -19,7 +19,7 @@ //! `capsules::ieee802154::mac::Mac`. Suppose we have such an implementation of type //! `XMacDevice`. //! -//! ```rust +//! ```rust,ignore //! let xmac: &XMacDevice = /* ... */; //! let mac_device = static_init!( //! capsules::ieee802154::mac::Framer<'static, XMacDevice>, @@ -32,7 +32,7 @@ //! The `mac_device` device is now set up. Users of the MAC device can now //! configure the underlying radio, prepare and send frames: //! -//! ```rust +//! ```rust,ignore //! mac_device.set_pan(0xABCD); //! mac_device.set_address(0x1008); //! mac_device.config_commit(); @@ -57,7 +57,7 @@ //! You should also be able to set up the userspace driver for receiving/sending //! 802.15.4 frames: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let radio_capsule = static_init!( diff --git a/capsules/extra/src/ieee802154/virtual_mac.rs b/capsules/extra/src/ieee802154/virtual_mac.rs index 57162c52ef..a740a88263 100644 --- a/capsules/extra/src/ieee802154/virtual_mac.rs +++ b/capsules/extra/src/ieee802154/virtual_mac.rs @@ -15,7 +15,7 @@ //! Usage //! ----- //! -//! ``` +//! ```rust,ignore //! # use kernel::static_init; //! //! // Create the mux. diff --git a/capsules/extra/src/ieee802154/xmac.rs b/capsules/extra/src/ieee802154/xmac.rs index 637c72c80f..1ecba9f0b8 100644 --- a/capsules/extra/src/ieee802154/xmac.rs +++ b/capsules/extra/src/ieee802154/xmac.rs @@ -36,7 +36,7 @@ //! a `kernel::hil::time::Alarm`, and a `kernel::hil::rng::Rng` device, the //! necessary modifications to the board configuration are shown below for `imix`s: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // main.rs diff --git a/capsules/extra/src/isl29035.rs b/capsules/extra/src/isl29035.rs index 7867d5802d..da576c5cd8 100644 --- a/capsules/extra/src/isl29035.rs +++ b/capsules/extra/src/isl29035.rs @@ -16,7 +16,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! diff --git a/capsules/extra/src/kv_driver.rs b/capsules/extra/src/kv_driver.rs index 10dcac6180..c6832cd95d 100644 --- a/capsules/extra/src/kv_driver.rs +++ b/capsules/extra/src/kv_driver.rs @@ -8,7 +8,7 @@ //! `StoragePermissions` so processes must have the required permissions in //! their TBF headers to use this interface. //! -//! ``` +//! ```rust,ignore //! +===============+ //! || Userspace || //! +===============+ diff --git a/capsules/extra/src/kv_store_permissions.rs b/capsules/extra/src/kv_store_permissions.rs index 2700760dd7..b6b14074a1 100644 --- a/capsules/extra/src/kv_store_permissions.rs +++ b/capsules/extra/src/kv_store_permissions.rs @@ -6,7 +6,7 @@ //! //! This capsule provides a KV interface with permissions and access control. //! -//! ``` +//! ```rust,ignore //! +-----------------------+ //! | Capsule using K-V | //! +-----------------------+ diff --git a/capsules/extra/src/l3gd20.rs b/capsules/extra/src/l3gd20.rs index 36574a5a7d..b03e94fdc2 100644 --- a/capsules/extra/src/l3gd20.rs +++ b/capsules/extra/src/l3gd20.rs @@ -66,7 +66,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let mux_spi = components::spi::SpiMuxComponent::new(&stm32f3xx::spi::SPI1) //! .finalize(components::spi_mux_component_helper!(stm32f3xx::spi::Spi)); //! @@ -77,7 +77,7 @@ //! //! NineDof Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_ninedof = board_kernel.create_grant(&grant_cap); //! @@ -91,7 +91,7 @@ //! //! Temperature Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_temp = board_kernel.create_grant(&grant_cap); //! diff --git a/capsules/extra/src/led_matrix.rs b/capsules/extra/src/led_matrix.rs index fc5275a8b1..32dfcd04c5 100644 --- a/capsules/extra/src/led_matrix.rs +++ b/capsules/extra/src/led_matrix.rs @@ -7,7 +7,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let led_matrix = components::led_matrix_component_helper!( //! nrf52833::gpio::GPIOPin, //! nrf52::rtc::Rtc<'static>, diff --git a/capsules/extra/src/log.rs b/capsules/extra/src/log.rs index 458632dcfd..42c09263e7 100644 --- a/capsules/extra/src/log.rs +++ b/capsules/extra/src/log.rs @@ -42,7 +42,7 @@ //! Usage //! ----- //! -//! ``` +//! ```rust,ignore //! storage_volume!(VOLUME, 2); //! static mut PAGEBUFFER: sam4l::flashcalw::Sam4lPage = sam4l::flashcalw::Sam4lPage::new(); //! diff --git a/capsules/extra/src/lps22hb.rs b/capsules/extra/src/lps22hb.rs index 93b5a83ed8..11d168bee9 100644 --- a/capsules/extra/src/lps22hb.rs +++ b/capsules/extra/src/lps22hb.rs @@ -23,7 +23,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let lps22hb_i2c = static_init!( diff --git a/capsules/extra/src/lps25hb.rs b/capsules/extra/src/lps25hb.rs index 99cf37f9db..03f0f16540 100644 --- a/capsules/extra/src/lps25hb.rs +++ b/capsules/extra/src/lps25hb.rs @@ -9,7 +9,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let buffer = static_init!([u8; capsules::lps25hb::BUF_LEN], [0; capsules::lps25hb::BUF_LEN]); //! let lps25hb_i2c = static_init!(I2CDevice, I2CDevice::new(i2c_bus, 0x5C)); //! let lps25hb = static_init!( diff --git a/capsules/extra/src/lsm303agr.rs b/capsules/extra/src/lsm303agr.rs index eb39ec6e98..ffc583922d 100644 --- a/capsules/extra/src/lsm303agr.rs +++ b/capsules/extra/src/lsm303agr.rs @@ -16,7 +16,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let mux_i2c = components::i2c::I2CMuxComponent::new(&stm32f3xx::i2c::I2C1) //! .finalize(components::i2c_mux_component_helper!()); //! @@ -36,7 +36,7 @@ //! //! NideDof Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_ninedof = board_kernel.create_grant(&grant_cap); //! @@ -59,7 +59,7 @@ //! //! Temperature Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_temp = board_kernel.create_grant(&grant_cap); //! diff --git a/capsules/extra/src/lsm303dlhc.rs b/capsules/extra/src/lsm303dlhc.rs index 98b74a5b7e..1117a020b5 100644 --- a/capsules/extra/src/lsm303dlhc.rs +++ b/capsules/extra/src/lsm303dlhc.rs @@ -15,7 +15,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let mux_i2c = components::i2c::I2CMuxComponent::new(&stm32f3xx::i2c::I2C1) //! .finalize(components::i2c_mux_component_helper!()); //! @@ -35,7 +35,7 @@ //! //! NideDof Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_ninedof = board_kernel.create_grant(&grant_cap); //! @@ -58,7 +58,7 @@ //! //! Temperature Example //! -//! ```rust +//! ```rust,ignore //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); //! let grant_temp = board_kernel.create_grant(&grant_cap); //! diff --git a/capsules/extra/src/ltc294x.rs b/capsules/extra/src/ltc294x.rs index 137975b303..5acaaacf6d 100644 --- a/capsules/extra/src/ltc294x.rs +++ b/capsules/extra/src/ltc294x.rs @@ -30,7 +30,7 @@ //! //! Here is a sample usage of this capsule in a board's main.rs file: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let buffer = static_init!([u8; capsules::ltc294x::BUF_LEN], [0; capsules::ltc294x::BUF_LEN]); diff --git a/capsules/extra/src/max17205.rs b/capsules/extra/src/max17205.rs index 68fd284f76..c2e6ce6030 100644 --- a/capsules/extra/src/max17205.rs +++ b/capsules/extra/src/max17205.rs @@ -16,7 +16,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // Two i2c addresses are necessary. diff --git a/capsules/extra/src/mcp230xx.rs b/capsules/extra/src/mcp230xx.rs index 549c325960..5e8d7dcd72 100644 --- a/capsules/extra/src/mcp230xx.rs +++ b/capsules/extra/src/mcp230xx.rs @@ -29,7 +29,7 @@ //! //! Example usage: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // Configure the MCP230xx. Device address 0x20. diff --git a/capsules/extra/src/mlx90614.rs b/capsules/extra/src/mlx90614.rs index e7518c8a37..07fc3a02bf 100644 --- a/capsules/extra/src/mlx90614.rs +++ b/capsules/extra/src/mlx90614.rs @@ -9,7 +9,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let mux_i2c = components::i2c::I2CMuxComponent::new(&earlgrey::i2c::I2C) //! .finalize(components::i2c_mux_component_helper!()); //! diff --git a/capsules/extra/src/mx25r6435f.rs b/capsules/extra/src/mx25r6435f.rs index f265b1a1c9..e9a14b9d2a 100644 --- a/capsules/extra/src/mx25r6435f.rs +++ b/capsules/extra/src/mx25r6435f.rs @@ -19,7 +19,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! @@ -76,7 +76,7 @@ pub const PAGE_SIZE: u32 = 256; /// /// An example looks like: /// -/// ``` +/// ```rust,ignore /// # use capsules::mx25r6435f::Mx25r6435fSector; /// /// static mut PAGEBUFFER: Mx25r6435fSector = Mx25r6435fSector::new(); diff --git a/capsules/extra/src/net/stream.rs b/capsules/extra/src/net/stream.rs index 40a484aa6c..6995418ccc 100644 --- a/capsules/extra/src/net/stream.rs +++ b/capsules/extra/src/net/stream.rs @@ -135,7 +135,7 @@ macro_rules! stream_from_option { /// would result in it defaulting to 0. Idiomatically, the way to combine /// encoders is to define another encoder as follows: /// -/// ```rust +/// ```rust,ignore /// # use capsules::{enc_try, stream_done}; /// # use capsules::net::stream::SResult; /// @@ -157,7 +157,7 @@ macro_rules! stream_from_option { /// /// Then, using an encoder can be done simply by: /// -/// ``` +/// ```rust,ignore /// # use capsules::net::stream::SResult; /// /// match encoder(&mut buf) { diff --git a/capsules/extra/src/ninedof.rs b/capsules/extra/src/ninedof.rs index 4a0dcbe294..c994758a45 100644 --- a/capsules/extra/src/ninedof.rs +++ b/capsules/extra/src/ninedof.rs @@ -9,7 +9,7 @@ //! //! You need a device that provides the `hil::sensors::NineDof` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::{hil, static_init}; //! //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); diff --git a/capsules/extra/src/nonvolatile_storage_driver.rs b/capsules/extra/src/nonvolatile_storage_driver.rs index e79953f034..0b9259cf9c 100644 --- a/capsules/extra/src/nonvolatile_storage_driver.rs +++ b/capsules/extra/src/nonvolatile_storage_driver.rs @@ -40,7 +40,7 @@ //! //! Example instantiation: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let nonvolatile_storage = static_init!( diff --git a/capsules/extra/src/nonvolatile_to_pages.rs b/capsules/extra/src/nonvolatile_to_pages.rs index 463182b3c9..c7430f0328 100644 --- a/capsules/extra/src/nonvolatile_to_pages.rs +++ b/capsules/extra/src/nonvolatile_to_pages.rs @@ -24,7 +24,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::{hil, static_init}; //! sam4l::flashcalw::FLASH_CONTROLLER.configure(); diff --git a/capsules/extra/src/nrf51822_serialization.rs b/capsules/extra/src/nrf51822_serialization.rs index 108c972fe4..01b57b3519 100644 --- a/capsules/extra/src/nrf51822_serialization.rs +++ b/capsules/extra/src/nrf51822_serialization.rs @@ -11,7 +11,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::{hil, static_init}; //! # use capsules::nrf51822_serialization; //! # use capsules::nrf51822_serialization::Nrf51822Serialization; diff --git a/capsules/extra/src/panic_button.rs b/capsules/extra/src/panic_button.rs index 9c4104a3ee..4b0374f4d4 100644 --- a/capsules/extra/src/panic_button.rs +++ b/capsules/extra/src/panic_button.rs @@ -14,7 +14,7 @@ //! //! Alternatively, a low-level way of using the capsule is as follows. //! -//! ```rust +//! ```rust,ignore //! let panic_button = static_init!( //! PanicButton, //! PanicButton::new( diff --git a/capsules/extra/src/pca9544a.rs b/capsules/extra/src/pca9544a.rs index 7802237ddf..378e5a3470 100644 --- a/capsules/extra/src/pca9544a.rs +++ b/capsules/extra/src/pca9544a.rs @@ -20,7 +20,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let pca9544a_i2c = static_init!( diff --git a/capsules/extra/src/pressure.rs b/capsules/extra/src/pressure.rs index 96593fabe9..e143617c8f 100644 --- a/capsules/extra/src/pressure.rs +++ b/capsules/extra/src/pressure.rs @@ -42,7 +42,7 @@ //! //! You need a device that provides the `hil::sensors::PressureDriver` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let pressure = static_init!( diff --git a/capsules/extra/src/proximity.rs b/capsules/extra/src/proximity.rs index 1ebfb32408..7d12a7dca8 100644 --- a/capsules/extra/src/proximity.rs +++ b/capsules/extra/src/proximity.rs @@ -40,7 +40,7 @@ //! You need a device that provides the `hil::sensors::ProximityDriver` trait. //! Here is an example of how to set up a proximity sensor with the apds9960 IC //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //!let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); diff --git a/capsules/extra/src/screen.rs b/capsules/extra/src/screen.rs index f63e6d5634..7ce903cddb 100644 --- a/capsules/extra/src/screen.rs +++ b/capsules/extra/src/screen.rs @@ -9,7 +9,7 @@ //! //! You need a screen that provides the `hil::screen::Screen` trait. //! -//! ```rust +//! ```rust,ignore //! let screen = //! components::screen::ScreenComponent::new(board_kernel, tft).finalize(); //! ``` diff --git a/capsules/extra/src/screen_shared.rs b/capsules/extra/src/screen_shared.rs index 3487959ed5..c0e358df24 100644 --- a/capsules/extra/src/screen_shared.rs +++ b/capsules/extra/src/screen_shared.rs @@ -10,7 +10,7 @@ //! Boards should create an array of `AppScreenRegion` objects that assign apps //! to specific regions (frames) within the screen. //! -//! ``` +//! ```rust,ignore //! AppScreenRegion { //! app_id: kernel::process:ShortId::new(id), //! frame: Frame { diff --git a/capsules/extra/src/sdcard.rs b/capsules/extra/src/sdcard.rs index 2ca11fb177..eacf1ad821 100644 --- a/capsules/extra/src/sdcard.rs +++ b/capsules/extra/src/sdcard.rs @@ -9,7 +9,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! # use kernel::hil::spi::SpiMasterDevice; diff --git a/capsules/extra/src/segger_rtt.rs b/capsules/extra/src/segger_rtt.rs index 8434e9d7ce..08802152a1 100644 --- a/capsules/extra/src/segger_rtt.rs +++ b/capsules/extra/src/segger_rtt.rs @@ -42,7 +42,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! pub struct Platform { //! // Other fields omitted for clarity //! console: &'static capsules::console::Console<'static>, @@ -51,7 +51,7 @@ //! //! In `main()`: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! diff --git a/capsules/extra/src/seven_segment.rs b/capsules/extra/src/seven_segment.rs index 8e156f1260..a8dd7d19a0 100644 --- a/capsules/extra/src/seven_segment.rs +++ b/capsules/extra/src/seven_segment.rs @@ -17,7 +17,7 @@ //! Microbit Pins: //! 4 digit 7 segment display pinout: //! -//! ```rust +//! ```rust,ignore //! const NUM_DIGITS: usize = 4; //! const DIGITS: [Pin; 4] = [Pin::P1_02, Pin::P0_12, Pin::P0_30, Pin::P0_09]; // [D1, D2, D3, D4] //! const SEGMENTS: [Pin; 7] = [ diff --git a/capsules/extra/src/sha.rs b/capsules/extra/src/sha.rs index 593660983d..f311c6693d 100644 --- a/capsules/extra/src/sha.rs +++ b/capsules/extra/src/sha.rs @@ -7,7 +7,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! let sha = &earlgrey::sha::HMAC; //! //! let mux_sha = static_init!(MuxSha<'static, lowrisc::sha::Sha>, MuxSha::new(sha)); diff --git a/capsules/extra/src/si7021.rs b/capsules/extra/src/si7021.rs index a170d3abe7..f801d7e0f6 100644 --- a/capsules/extra/src/si7021.rs +++ b/capsules/extra/src/si7021.rs @@ -21,7 +21,7 @@ //! Usage //! ----- //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! # use capsules::virtual_alarm::VirtualMuxAlarm; //! diff --git a/capsules/extra/src/sound_pressure.rs b/capsules/extra/src/sound_pressure.rs index 93a6f759f6..ba00b5cbab 100644 --- a/capsules/extra/src/sound_pressure.rs +++ b/capsules/extra/src/sound_pressure.rs @@ -42,7 +42,7 @@ //! //! You need a device that provides the `hil::sensors::SoundPressure` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); diff --git a/capsules/extra/src/st77xx.rs b/capsules/extra/src/st77xx.rs index 721fe6c36f..7df35ba28b 100644 --- a/capsules/extra/src/st77xx.rs +++ b/capsules/extra/src/st77xx.rs @@ -14,7 +14,7 @@ //! //! SPI example //! -//! ```rust +//! ```rust,ignore //! let tft = components::st77xx::ST77XXComponent::new(mux_alarm, //! bus, //! Some(&nrf52840::gpio::PORT[GPIO_D3]), diff --git a/capsules/extra/src/temperature.rs b/capsules/extra/src/temperature.rs index 51d52b4da4..d39c32b6c7 100644 --- a/capsules/extra/src/temperature.rs +++ b/capsules/extra/src/temperature.rs @@ -41,7 +41,7 @@ //! //! You need a device that provides the `hil::sensors::TemperatureDriver` trait. //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); diff --git a/capsules/extra/src/test/kv_system.rs b/capsules/extra/src/test/kv_system.rs index 48a106864c..c456e34b30 100644 --- a/capsules/extra/src/test/kv_system.rs +++ b/capsules/extra/src/test/kv_system.rs @@ -11,7 +11,7 @@ //! //! The tests can be enabled by adding this line to the `main()` //! -//! ```rust +//! ```rust,ignore //! tickv_test::run_tickv_tests(kvstore) //! ``` //! diff --git a/capsules/extra/src/text_screen.rs b/capsules/extra/src/text_screen.rs index ef166ef73a..cba0918665 100644 --- a/capsules/extra/src/text_screen.rs +++ b/capsules/extra/src/text_screen.rs @@ -10,7 +10,7 @@ //! You need a screen that provides the `hil::text_screen::TextScreen` //! trait. //! -//! ```rust +//! ```rust,ignore //! let text_screen = components::text_screen::TextScreenComponent::new(board_kernel, lcd) //! .finalize(components::screen_buffer_size!(64)); //! ``` diff --git a/capsules/extra/src/tickv.rs b/capsules/extra/src/tickv.rs index 87ed1246e8..2bca648f8d 100644 --- a/capsules/extra/src/tickv.rs +++ b/capsules/extra/src/tickv.rs @@ -10,7 +10,7 @@ //! This capsule interfaces with flash and exposes the Tock `tickv::kv_system` //! interface to others. //! -//! ``` +//! ```text //! +-----------------------+ //! | Capsule using K-V | //! +-----------------------+ diff --git a/capsules/extra/src/tickv_kv_store.rs b/capsules/extra/src/tickv_kv_store.rs index d8c8ad61ae..6e3a6bc817 100644 --- a/capsules/extra/src/tickv_kv_store.rs +++ b/capsules/extra/src/tickv_kv_store.rs @@ -7,7 +7,7 @@ //! This capsule provides a higher level Key-Value store interface based on an //! underlying `tickv::kv_system` storage layer. //! -//! ``` +//! ```text //! +-----------------------+ //! | Capsule using K-V | //! +-----------------------+ diff --git a/capsules/extra/src/touch.rs b/capsules/extra/src/touch.rs index 489238f02b..397c7599c7 100644 --- a/capsules/extra/src/touch.rs +++ b/capsules/extra/src/touch.rs @@ -10,7 +10,7 @@ //! You need a touch that provides the `hil::touch::Touch` trait. //! An optional gesture client and a screen can be connected to it. //! -//! ```rust +//! ```rust,ignore //! let touch = //! components::touch::TouchComponent::new(board_kernel, ts, Some(ts), Some(screen)).finalize(()); //! ``` diff --git a/capsules/extra/src/usb/usb_user.rs b/capsules/extra/src/usb/usb_user.rs index 4216e88c8f..35ebc781f7 100644 --- a/capsules/extra/src/usb/usb_user.rs +++ b/capsules/extra/src/usb/usb_user.rs @@ -13,7 +13,7 @@ //! the USBC), as well as a `Grant` for managing application requests. For //! example: //! -//! ```rust +//! ```rust,ignore //! # use kernel::static_init; //! //! // Configure the USB controller diff --git a/capsules/extra/src/usb/usbc_client_ctrl.rs b/capsules/extra/src/usb/usbc_client_ctrl.rs index 1e618ef901..56d7aaff92 100644 --- a/capsules/extra/src/usb/usbc_client_ctrl.rs +++ b/capsules/extra/src/usb/usbc_client_ctrl.rs @@ -9,7 +9,7 @@ //! //! Right now, the stack looks like this: //! -//! ``` +//! ```text //! Client //! | ^ //! |----- | diff --git a/capsules/extra/src/virtual_kv.rs b/capsules/extra/src/virtual_kv.rs index 947d7083f3..96e741605e 100644 --- a/capsules/extra/src/virtual_kv.rs +++ b/capsules/extra/src/virtual_kv.rs @@ -6,7 +6,7 @@ //! //! This capsule provides a virtualized Key-Value store interface. //! -//! ``` +//! ```text //! +-------------------------+ //! | Capsule using K-V | //! +-------------------------+