pub struct Board {Show 46 fields
pub pins: Pins,
pub edge: Edge,
pub display_pins: DisplayPins,
pub buttons: Buttons,
pub i2c: I2CPins,
pub uart: UartPins,
pub CBP: CBP,
pub CPUID: CPUID,
pub DCB: DCB,
pub DWT: DWT,
pub FPB: FPB,
pub ITM: ITM,
pub MPU: MPU,
pub NVIC: NVIC,
pub SCB: SCB,
pub SYST: SYST,
pub TPIU: TPIU,
pub ADC: ADC,
pub CLOCK: CLOCK,
pub FICR: FICR,
pub GPIOTE: GPIOTE,
pub PPI: PPI,
pub RADIO: RADIO,
pub RNG: RNG,
pub RTC0: RTC0,
pub TEMP: TEMP,
pub TIMER0: TIMER0,
pub TIMER1: TIMER1,
pub TIMER2: TIMER2,
pub TWI0: TWI0,
pub UART0: UART0,
pub POWER: POWER,
pub SPI0: SPI0,
pub SPI1: SPI1,
pub TWI1: TWI1,
pub SPIS1: SPIS1,
pub ECB: ECB,
pub AAR: AAR,
pub CCM: CCM,
pub WDT: WDT,
pub RTC1: RTC1,
pub QDEC: QDEC,
pub LPCOMP: LPCOMP,
pub SWI: SWI,
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
i2c: I2CPinsI2C shared internal and 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
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
ADC: ADCnRF51 peripheral: ADC
CLOCK: CLOCKnRF51 peripheral: CLOCK
FICR: FICRnRF51 peripheral: FICR
GPIOTE: GPIOTEnRF51 peripheral: GPIOTE
PPI: PPInRF51 preipheral: PPI
RADIO: RADIOnRF51 peripheral: RADIO
RNG: RNGnRF51 peripheral: RNG
RTC0: RTC0nRF51 peripheral: RTC0
TEMP: TEMPnRF51 peripheral: TEMP
Can be used with Temp::new()
TIMER0: TIMER0nRF51 peripheral: TIMER0
TIMER1: TIMER1nRF51 peripheral: TIMER1
TIMER2: TIMER2nRF51 peripheral: TIMER2
TWI0: TWI0nRF51 peripheral: TWI0
UART0: UART0nrf51 peripheral: UART0
POWER: POWERnrf51 peripheral: POWER
SPI0: SPI0nrf51 peripheral: SPI0
SPI1: SPI1nrf51 peripheral: SPI1
TWI1: TWI1nrf51 peripheral: TWI1
SPIS1: SPIS1nrf51 peripheral: SPIS1
ECB: ECBnrf51 peripheral: ECB
AAR: AARnrf51 peripheral: AAR
CCM: CCMnrf51 peripheral: CCM
WDT: WDTnrf51 peripheral: WDT
RTC1: RTC1nrf51 peripheral: RTC1
QDEC: QDECnrf51 peripheral: QDEC
LPCOMP: LPCOMPnrf51 peripheral: LPCOMP
SWI: SWInrf51 peripheral: SWI
NVMC: NVMCnrf51 peripheral: NVMC
UICR: UICRnrf51 peripheral: UICR
Implementations§
Source§impl 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.