pub struct Board {Show 61 fields
pub pins: Pins,
pub edge: Edge,
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 PPI: PPI,
pub PWM0: PWM0,
pub PWM1: PWM1,
pub PWM2: PWM2,
pub PWM3: PWM3,
pub RADIO: RADIO,
pub RNG: RNG,
pub RTC0: RTC0,
pub RTC1: RTC1,
pub RTC2: RTC2,
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 ADC: SAADC,
pub POWER: POWER,
pub SPI0: SPI0,
pub SPI1: SPI1,
pub SPI2: SPI2,
pub UART0: UART0,
pub TWI0: TWI0,
pub TWI1: TWI1,
pub SPIS1: SPIS1,
pub ECB: ECB,
pub AAR: AAR,
pub CCM: CCM,
pub WDT: WDT,
pub QDEC: QDEC,
pub LPCOMP: LPCOMP,
pub NVMC: NVMC,
pub UICR: UICR,
}Expand description
Provides access to the microbit
Fields§
§pins: PinsGPIO pins that are not otherwise used
edge: EdgeUnused GPIO pins on edge connector
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
PPI: PPInRF52 preipheral: PPI
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
RTC1: RTC1nRF52 peripheral: RTC1
RTC2: RTC2nRF52 peripheral: RTC2
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
ADC: SAADCnRF52 peripheral: SAADC
POWER: POWERnRF52 peripheral: POWER
SPI0: SPI0nRF52 peripheral: SPI0
SPI1: SPI1nRF52 peripheral: SPI1
SPI2: SPI2nRF52 peripheral: SPI2
UART0: UART0nRF52 peripheral: UART0
TWI0: TWI0nRF52 peripheral: TWI0
TWI1: TWI1nRF52 peripheral: TWI1
SPIS1: SPIS1nRF52 peripheral: SPIS1
ECB: ECBnRF52 peripheral: ECB
AAR: AARnRF52 peripheral: AAR
CCM: CCMnRF52 peripheral: CCM
WDT: WDTnRF52 peripheral: WDT
QDEC: QDECnRF52 peripheral: QDEC
LPCOMP: LPCOMPnRF52 peripheral: LPCOMP
NVMC: NVMCnRF52 peripheral: NVMC
UICR: UICRnRF52 peripheral: UICR
Implementations§
Source§impl Board
impl Board
Sourcepub fn take() -> Option<Self>
pub fn take() -> Option<Self>
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: CorePeripherals) -> Self
pub fn new(p: Peripherals, cp: CorePeripherals) -> Self
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.