pub struct Board {Show 41 fields
pub pins: Pins,
pub display_pins: DisplayPins,
pub buttons: Buttons,
pub speaker_pin: P0_00<Disconnected>,
pub microphone_pins: MicrophonePins,
pub i2c_internal: I2CInternalPins,
pub i2c_external: I2CExternalPins,
pub uart: UartPins,
pub CBP: CBP,
pub CPUID: CPUID,
pub DCB: DCB,
pub DWT: DWT,
pub FPB: FPB,
pub FPU: FPU,
pub ITM: ITM,
pub MPU: MPU,
pub NVIC: NVIC,
pub SCB: SCB,
pub SYST: SYST,
pub TPIU: TPIU,
pub CLOCK: CLOCK,
pub FICR: FICR,
pub GPIOTE: GPIOTE,
pub PWM0: PWM0,
pub PWM1: PWM1,
pub PWM2: PWM2,
pub PWM3: PWM3,
pub RADIO: RADIO,
pub RNG: RNG,
pub RTC0: RTC0,
pub TEMP: TEMP,
pub TIMER0: TIMER0,
pub TIMER1: TIMER1,
pub TIMER2: TIMER2,
pub TIMER3: TIMER3,
pub TIMER4: TIMER4,
pub TWIM0: TWIM0,
pub TWIS0: TWIS0,
pub UARTE0: UARTE0,
pub UARTE1: UARTE1,
pub SAADC: SAADC,
}Expand description
Provides access to the micrbobit
Fields
pins: PinsGPIO pins that are not otherwise used
display_pins: DisplayPinsdisplay pins
buttons
speaker_pin: P0_00<Disconnected>speaker
microphone_pins: MicrophonePinsmicrophone pins
i2c_internal: I2CInternalPinsI2C internal bus pins
i2c_external: I2CExternalPinsI2C external bus pins
uart: UartPinsUART to debugger pins
CBP: CBPCore peripheral: Cache and branch predictor maintenance operations
CPUID: CPUIDCore peripheral: CPUID
DCB: DCBCore peripheral: Debug Control Block
DWT: DWTCore peripheral: Data Watchpoint and Trace unit
FPB: FPBCore peripheral: Flash Patch and Breakpoint unit
FPU: FPUCore peripheral: Floating Point Unit
ITM: ITMCore peripheral: Instrumentation Trace Macrocell
MPU: MPUCore peripheral: Memory Protection Unit
NVIC: NVICCore peripheral: Nested Vector Interrupt Controller
SCB: SCBCore peripheral: System Control Block
SYST: SYSTCore peripheral: SysTick Timer
TPIU: TPIUCore peripheral: Trace Port Interface Unit
CLOCK: CLOCKnRF52 peripheral: CLOCK
FICR: FICRnRF52 peripheral: FICR
GPIOTE: GPIOTEnRF52 peripheral: GPIOTE
PWM0: PWM0nRF52 peripheral: PWM0
PWM1: PWM1nRF52 peripheral: PWM1
PWM2: PWM2nRF52 peripheral: PWM2
PWM3: PWM3nRF52 peripheral: PWM3
RADIO: RADIOnRF52 peripheral: RADIO
RNG: RNGnRF52 peripheral: RNG
RTC0: RTC0nRF52 peripheral: RTC0
TEMP: TEMPnRF52 peripheral: TEMP
Can be used with Temp::new()
TIMER0: TIMER0nRF52 peripheral: TIMER0
TIMER1: TIMER1nRF52 peripheral: TIMER1
TIMER2: TIMER2nRF52 peripheral: TIMER2
TIMER3: TIMER3nRF52 peripheral: TIMER3
TIMER4: TIMER4nRF52 peripheral: TIMER4
TWIM0: TWIM0nRF52 peripheral: TWIM0
TWIS0: TWIS0nRF52 peripheral: TWIS0
UARTE0: UARTE0nRF52 peripheral: UARTE0
UARTE1: UARTE1nRF52 peripheral: UARTE1
SAADC: SAADCnRF52 peripheral: SAADC
Implementations
sourceimpl Board
impl Board
sourcepub fn take() -> Option<Board>
pub fn take() -> Option<Board>
Take the peripherals safely
This method will return an instance of the board the first time it is
called. It will return only None on subsequent calls.
This function can also return None if one of the the peripherals was
already taken.
sourcepub fn new(p: Peripherals, cp: Peripherals) -> Board
pub fn new(p: Peripherals, cp: Peripherals) -> Board
Fallback method in the case peripherals and core peripherals were taken elsewhere already.
This method will take the peripherals and core peripherals and return an instance of the board.
An exemplary usecase is shown in the rtic display example.
Auto Trait Implementations
impl RefUnwindSafe for Board
impl Send for Board
impl !Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
OverflowingCasts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
UnwrappedCasts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
WrappingCasts the value.