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: Pins
GPIO pins that are not otherwise used
edge: Edge
Unused GPIO pins on edge connector
display_pins: DisplayPins
display pins
buttons
i2c: I2CPins
I2C shared internal and external bus pins
uart: UartPins
UART to debugger pins
CBP: CBP
Core peripheral: Cache and branch predictor maintenance operations
CPUID: CPUID
Core peripheral: CPUID
DCB: DCB
Core peripheral: Debug Control Block
DWT: DWT
Core peripheral: Data Watchpoint and Trace unit
FPB: FPB
Core peripheral: Flash Patch and Breakpoint unit
ITM: ITM
Core peripheral: Instrumentation Trace Macrocell
MPU: MPU
Core peripheral: Memory Protection Unit
NVIC: NVIC
Core peripheral: Nested Vector Interrupt Controller
SCB: SCB
Core peripheral: System Control Block
SYST: SYST
Core peripheral: SysTick Timer
TPIU: TPIU
Core peripheral: Trace Port Interface Unit
ADC: ADC
nRF51 peripheral: ADC
CLOCK: CLOCK
nRF51 peripheral: CLOCK
FICR: FICR
nRF51 peripheral: FICR
GPIOTE: GPIOTE
nRF51 peripheral: GPIOTE
PPI: PPI
nRF51 preipheral: PPI
RADIO: RADIO
nRF51 peripheral: RADIO
RNG: RNG
nRF51 peripheral: RNG
RTC0: RTC0
nRF51 peripheral: RTC0
TEMP: TEMP
nRF51 peripheral: TEMP
Can be used with Temp::new()
TIMER0: TIMER0
nRF51 peripheral: TIMER0
TIMER1: TIMER1
nRF51 peripheral: TIMER1
TIMER2: TIMER2
nRF51 peripheral: TIMER2
TWI0: TWI0
nRF51 peripheral: TWI0
UART0: UART0
nrf51 peripheral: UART0
POWER: POWER
nrf51 peripheral: POWER
SPI0: SPI0
nrf51 peripheral: SPI0
SPI1: SPI1
nrf51 peripheral: SPI1
TWI1: TWI1
nrf51 peripheral: TWI1
SPIS1: SPIS1
nrf51 peripheral: SPIS1
ECB: ECB
nrf51 peripheral: ECB
AAR: AAR
nrf51 peripheral: AAR
CCM: CCM
nrf51 peripheral: CCM
WDT: WDT
nrf51 peripheral: WDT
RTC1: RTC1
nrf51 peripheral: RTC1
QDEC: QDEC
nrf51 peripheral: QDEC
LPCOMP: LPCOMP
nrf51 peripheral: LPCOMP
SWI: SWI
nrf51 peripheral: SWI
NVMC: NVMC
nrf51 peripheral: NVMC
UICR: UICR
nrf51 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.