mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-26 11:59:33 +01:00
25 lines
No EOL
22 KiB
HTML
25 lines
No EOL
22 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Peripheral access API for RP2040 microcontrollers (generated using svd2rust v0.31.5 ( ))"><title>rp2040_pac - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-b0742ba02757f159.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="rp2040_pac" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0 (90b35a623 2024-11-26)" data-channel="1.83.0" data-search-js="search-f0d225181b97f9a4.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f070b9041d14864c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-0111fcff984fae8f.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../rp2040_pac/index.html">rp2040_<wbr>pac</a><span class="version">0.6.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>rp2040_pac</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/rp2040_pac/lib.rs.html#1-2441">source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Peripheral access API for RP2040 microcontrollers (generated using svd2rust v0.31.5 ( ))</p>
|
|
<p>You can find an overview of the generated API <a href="https://docs.rs/svd2rust/0.31.5/svd2rust/#peripheral-api">here</a>.</p>
|
|
<p>API features to be included in the <a href="https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased">next</a>
|
|
svd2rust release can be generated by cloning the svd2rust <a href="https://github.com/rust-embedded/svd2rust">repository</a>, checking out the above commit, and running <code>cargo doc --open</code>.</p>
|
|
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.pll_usb"><code>pub use self::<a class="mod" href="pll_sys/index.html" title="mod rp2040_pac::pll_sys">pll_sys</a> as pll_usb;</code></div></li><li><div class="item-name" id="reexport.uart1"><code>pub use self::<a class="mod" href="uart0/index.html" title="mod rp2040_pac::uart0">uart0</a> as uart1;</code></div></li><li><div class="item-name" id="reexport.spi1"><code>pub use self::<a class="mod" href="spi0/index.html" title="mod rp2040_pac::spi0">spi0</a> as spi1;</code></div></li><li><div class="item-name" id="reexport.i2c1"><code>pub use self::<a class="mod" href="i2c0/index.html" title="mod rp2040_pac::i2c0">i2c0</a> as i2c1;</code></div></li><li><div class="item-name" id="reexport.pio1"><code>pub use self::<a class="mod" href="pio0/index.html" title="mod rp2040_pac::pio0">pio0</a> as pio1;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="adc/index.html" title="mod rp2040_pac::adc">adc</a></div><div class="desc docblock-short">Control and data interface to SAR ADC</div></li><li><div class="item-name"><a class="mod" href="busctrl/index.html" title="mod rp2040_pac::busctrl">busctrl</a></div><div class="desc docblock-short">Register block for busfabric control signals and performance counters</div></li><li><div class="item-name"><a class="mod" href="clocks/index.html" title="mod rp2040_pac::clocks">clocks</a></div><div class="desc docblock-short">CLOCKS</div></li><li><div class="item-name"><a class="mod" href="dma/index.html" title="mod rp2040_pac::dma">dma</a></div><div class="desc docblock-short">DMA with separate read and write masters</div></li><li><div class="item-name"><a class="mod" href="generic/index.html" title="mod rp2040_pac::generic">generic</a></div><div class="desc docblock-short">Common register and bit access and modify traits</div></li><li><div class="item-name"><a class="mod" href="i2c0/index.html" title="mod rp2040_pac::i2c0">i2c0</a></div><div class="desc docblock-short">DW_apb_i2c address block</div></li><li><div class="item-name"><a class="mod" href="io_bank0/index.html" title="mod rp2040_pac::io_bank0">io_<wbr>bank0</a></div><div class="desc docblock-short">IO_BANK0</div></li><li><div class="item-name"><a class="mod" href="io_qspi/index.html" title="mod rp2040_pac::io_qspi">io_qspi</a></div><div class="desc docblock-short">IO_QSPI</div></li><li><div class="item-name"><a class="mod" href="pads_bank0/index.html" title="mod rp2040_pac::pads_bank0">pads_<wbr>bank0</a></div><div class="desc docblock-short">PADS_BANK0</div></li><li><div class="item-name"><a class="mod" href="pads_qspi/index.html" title="mod rp2040_pac::pads_qspi">pads_<wbr>qspi</a></div><div class="desc docblock-short">PADS_QSPI</div></li><li><div class="item-name"><a class="mod" href="pio0/index.html" title="mod rp2040_pac::pio0">pio0</a></div><div class="desc docblock-short">Programmable IO block</div></li><li><div class="item-name"><a class="mod" href="pll_sys/index.html" title="mod rp2040_pac::pll_sys">pll_sys</a></div><div class="desc docblock-short">PLL_SYS</div></li><li><div class="item-name"><a class="mod" href="ppb/index.html" title="mod rp2040_pac::ppb">ppb</a></div><div class="desc docblock-short">PPB</div></li><li><div class="item-name"><a class="mod" href="psm/index.html" title="mod rp2040_pac::psm">psm</a></div><div class="desc docblock-short">PSM</div></li><li><div class="item-name"><a class="mod" href="pwm/index.html" title="mod rp2040_pac::pwm">pwm</a></div><div class="desc docblock-short">Simple PWM</div></li><li><div class="item-name"><a class="mod" href="resets/index.html" title="mod rp2040_pac::resets">resets</a></div><div class="desc docblock-short">RESETS</div></li><li><div class="item-name"><a class="mod" href="rosc/index.html" title="mod rp2040_pac::rosc">rosc</a></div><div class="desc docblock-short">ROSC</div></li><li><div class="item-name"><a class="mod" href="rtc/index.html" title="mod rp2040_pac::rtc">rtc</a></div><div class="desc docblock-short">Register block to control RTC</div></li><li><div class="item-name"><a class="mod" href="sio/index.html" title="mod rp2040_pac::sio">sio</a></div><div class="desc docblock-short">Single-cycle IO block<br />
|
|
Provides core-local and inter-core hardware for the two processors, with single-cycle access.</div></li><li><div class="item-name"><a class="mod" href="spi0/index.html" title="mod rp2040_pac::spi0">spi0</a></div><div class="desc docblock-short">SPI0</div></li><li><div class="item-name"><a class="mod" href="syscfg/index.html" title="mod rp2040_pac::syscfg">syscfg</a></div><div class="desc docblock-short">Register block for various chip control signals</div></li><li><div class="item-name"><a class="mod" href="sysinfo/index.html" title="mod rp2040_pac::sysinfo">sysinfo</a></div><div class="desc docblock-short">SYSINFO</div></li><li><div class="item-name"><a class="mod" href="tbman/index.html" title="mod rp2040_pac::tbman">tbman</a></div><div class="desc docblock-short">Testbench manager. Allows the programmer to know what platform their software is running on.</div></li><li><div class="item-name"><a class="mod" href="timer/index.html" title="mod rp2040_pac::timer">timer</a></div><div class="desc docblock-short">Controls time and alarms<br />
|
|
time is a 64 bit value indicating the time in usec since power-on<br />
|
|
timeh is the top 32 bits of time & timel is the bottom 32 bits<br />
|
|
to change time write to timelw before timehw<br />
|
|
to read time read from timelr before timehr<br />
|
|
An alarm is set by setting alarm_enable and writing to the corresponding alarm register<br />
|
|
When an alarm is pending, the corresponding alarm_running signal will be high<br />
|
|
An alarm can be cancelled before it has finished by clearing the alarm_enable<br />
|
|
When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared<br />
|
|
To clear the interrupt write a 1 to the corresponding alarm_irq</div></li><li><div class="item-name"><a class="mod" href="uart0/index.html" title="mod rp2040_pac::uart0">uart0</a></div><div class="desc docblock-short">UART0</div></li><li><div class="item-name"><a class="mod" href="usbctrl_dpram/index.html" title="mod rp2040_pac::usbctrl_dpram">usbctrl_<wbr>dpram</a></div><div class="desc docblock-short">DPRAM layout for USB device.</div></li><li><div class="item-name"><a class="mod" href="usbctrl_regs/index.html" title="mod rp2040_pac::usbctrl_regs">usbctrl_<wbr>regs</a></div><div class="desc docblock-short">USB FS/LS controller device registers</div></li><li><div class="item-name"><a class="mod" href="vreg_and_chip_reset/index.html" title="mod rp2040_pac::vreg_and_chip_reset">vreg_<wbr>and_<wbr>chip_<wbr>reset</a></div><div class="desc docblock-short">control and status for on-chip voltage regulator and chip level reset subsystem</div></li><li><div class="item-name"><a class="mod" href="watchdog/index.html" title="mod rp2040_pac::watchdog">watchdog</a></div><div class="desc docblock-short">WATCHDOG</div></li><li><div class="item-name"><a class="mod" href="xip_ctrl/index.html" title="mod rp2040_pac::xip_ctrl">xip_<wbr>ctrl</a></div><div class="desc docblock-short">QSPI flash execute-in-place block</div></li><li><div class="item-name"><a class="mod" href="xip_ssi/index.html" title="mod rp2040_pac::xip_ssi">xip_ssi</a></div><div class="desc docblock-short">DW_apb_ssi has the following features:</div></li><li><div class="item-name"><a class="mod" href="xosc/index.html" title="mod rp2040_pac::xosc">xosc</a></div><div class="desc docblock-short">Controls the crystal oscillator</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.ADC.html" title="struct rp2040_pac::ADC">ADC</a></div><div class="desc docblock-short">Control and data interface to SAR ADC</div></li><li><div class="item-name"><a class="struct" href="struct.BUSCTRL.html" title="struct rp2040_pac::BUSCTRL">BUSCTRL</a></div><div class="desc docblock-short">Register block for busfabric control signals and performance counters</div></li><li><div class="item-name"><a class="struct" href="struct.CBP.html" title="struct rp2040_pac::CBP">CBP</a></div><div class="desc docblock-short">Cache and branch predictor maintenance operations</div></li><li><div class="item-name"><a class="struct" href="struct.CLOCKS.html" title="struct rp2040_pac::CLOCKS">CLOCKS</a></div><div class="desc docblock-short">CLOCKS</div></li><li><div class="item-name"><a class="struct" href="struct.CPUID.html" title="struct rp2040_pac::CPUID">CPUID</a></div><div class="desc docblock-short">CPUID</div></li><li><div class="item-name"><a class="struct" href="struct.CorePeripherals.html" title="struct rp2040_pac::CorePeripherals">Core<wbr>Peripherals</a></div><div class="desc docblock-short">Core peripherals</div></li><li><div class="item-name"><a class="struct" href="struct.DCB.html" title="struct rp2040_pac::DCB">DCB</a></div><div class="desc docblock-short">Debug Control Block</div></li><li><div class="item-name"><a class="struct" href="struct.DMA.html" title="struct rp2040_pac::DMA">DMA</a></div><div class="desc docblock-short">DMA with separate read and write masters</div></li><li><div class="item-name"><a class="struct" href="struct.DWT.html" title="struct rp2040_pac::DWT">DWT</a></div><div class="desc docblock-short">Data Watchpoint and Trace unit</div></li><li><div class="item-name"><a class="struct" href="struct.FPB.html" title="struct rp2040_pac::FPB">FPB</a></div><div class="desc docblock-short">Flash Patch and Breakpoint unit</div></li><li><div class="item-name"><a class="struct" href="struct.I2C0.html" title="struct rp2040_pac::I2C0">I2C0</a></div><div class="desc docblock-short">DW_apb_i2c address block</div></li><li><div class="item-name"><a class="struct" href="struct.I2C1.html" title="struct rp2040_pac::I2C1">I2C1</a></div><div class="desc docblock-short">DW_apb_i2c address block</div></li><li><div class="item-name"><a class="struct" href="struct.IO_BANK0.html" title="struct rp2040_pac::IO_BANK0">IO_<wbr>BANK0</a></div><div class="desc docblock-short">IO_BANK0</div></li><li><div class="item-name"><a class="struct" href="struct.IO_QSPI.html" title="struct rp2040_pac::IO_QSPI">IO_QSPI</a></div><div class="desc docblock-short">IO_QSPI</div></li><li><div class="item-name"><a class="struct" href="struct.ITM.html" title="struct rp2040_pac::ITM">ITM</a></div><div class="desc docblock-short">Instrumentation Trace Macrocell</div></li><li><div class="item-name"><a class="struct" href="struct.MPU.html" title="struct rp2040_pac::MPU">MPU</a></div><div class="desc docblock-short">Memory Protection Unit</div></li><li><div class="item-name"><a class="struct" href="struct.NVIC.html" title="struct rp2040_pac::NVIC">NVIC</a></div><div class="desc docblock-short">Nested Vector Interrupt Controller</div></li><li><div class="item-name"><a class="struct" href="struct.PADS_BANK0.html" title="struct rp2040_pac::PADS_BANK0">PADS_<wbr>BANK0</a></div><div class="desc docblock-short">PADS_BANK0</div></li><li><div class="item-name"><a class="struct" href="struct.PADS_QSPI.html" title="struct rp2040_pac::PADS_QSPI">PADS_<wbr>QSPI</a></div><div class="desc docblock-short">PADS_QSPI</div></li><li><div class="item-name"><a class="struct" href="struct.PIO0.html" title="struct rp2040_pac::PIO0">PIO0</a></div><div class="desc docblock-short">Programmable IO block</div></li><li><div class="item-name"><a class="struct" href="struct.PIO1.html" title="struct rp2040_pac::PIO1">PIO1</a></div><div class="desc docblock-short">Programmable IO block</div></li><li><div class="item-name"><a class="struct" href="struct.PLL_SYS.html" title="struct rp2040_pac::PLL_SYS">PLL_SYS</a></div><div class="desc docblock-short">PLL_SYS</div></li><li><div class="item-name"><a class="struct" href="struct.PLL_USB.html" title="struct rp2040_pac::PLL_USB">PLL_USB</a></div><div class="desc docblock-short">PLL_USB</div></li><li><div class="item-name"><a class="struct" href="struct.PPB.html" title="struct rp2040_pac::PPB">PPB</a></div><div class="desc docblock-short">PPB</div></li><li><div class="item-name"><a class="struct" href="struct.PSM.html" title="struct rp2040_pac::PSM">PSM</a></div><div class="desc docblock-short">PSM</div></li><li><div class="item-name"><a class="struct" href="struct.PWM.html" title="struct rp2040_pac::PWM">PWM</a></div><div class="desc docblock-short">Simple PWM</div></li><li><div class="item-name"><a class="struct" href="struct.Peripherals.html" title="struct rp2040_pac::Peripherals">Peripherals</a></div><div class="desc docblock-short">All the peripherals.</div></li><li><div class="item-name"><a class="struct" href="struct.RESETS.html" title="struct rp2040_pac::RESETS">RESETS</a></div><div class="desc docblock-short">RESETS</div></li><li><div class="item-name"><a class="struct" href="struct.ROSC.html" title="struct rp2040_pac::ROSC">ROSC</a></div><div class="desc docblock-short">ROSC</div></li><li><div class="item-name"><a class="struct" href="struct.RTC.html" title="struct rp2040_pac::RTC">RTC</a></div><div class="desc docblock-short">Register block to control RTC</div></li><li><div class="item-name"><a class="struct" href="struct.SCB.html" title="struct rp2040_pac::SCB">SCB</a></div><div class="desc docblock-short">System Control Block</div></li><li><div class="item-name"><a class="struct" href="struct.SIO.html" title="struct rp2040_pac::SIO">SIO</a></div><div class="desc docblock-short">Single-cycle IO block<br />
|
|
Provides core-local and inter-core hardware for the two processors, with single-cycle access.</div></li><li><div class="item-name"><a class="struct" href="struct.SPI0.html" title="struct rp2040_pac::SPI0">SPI0</a></div><div class="desc docblock-short">SPI0</div></li><li><div class="item-name"><a class="struct" href="struct.SPI1.html" title="struct rp2040_pac::SPI1">SPI1</a></div><div class="desc docblock-short">SPI1</div></li><li><div class="item-name"><a class="struct" href="struct.SYSCFG.html" title="struct rp2040_pac::SYSCFG">SYSCFG</a></div><div class="desc docblock-short">Register block for various chip control signals</div></li><li><div class="item-name"><a class="struct" href="struct.SYSINFO.html" title="struct rp2040_pac::SYSINFO">SYSINFO</a></div><div class="desc docblock-short">SYSINFO</div></li><li><div class="item-name"><a class="struct" href="struct.SYST.html" title="struct rp2040_pac::SYST">SYST</a></div><div class="desc docblock-short">SysTick: System Timer</div></li><li><div class="item-name"><a class="struct" href="struct.TBMAN.html" title="struct rp2040_pac::TBMAN">TBMAN</a></div><div class="desc docblock-short">Testbench manager. Allows the programmer to know what platform their software is running on.</div></li><li><div class="item-name"><a class="struct" href="struct.TIMER.html" title="struct rp2040_pac::TIMER">TIMER</a></div><div class="desc docblock-short">Controls time and alarms<br />
|
|
time is a 64 bit value indicating the time in usec since power-on<br />
|
|
timeh is the top 32 bits of time & timel is the bottom 32 bits<br />
|
|
to change time write to timelw before timehw<br />
|
|
to read time read from timelr before timehr<br />
|
|
An alarm is set by setting alarm_enable and writing to the corresponding alarm register<br />
|
|
When an alarm is pending, the corresponding alarm_running signal will be high<br />
|
|
An alarm can be cancelled before it has finished by clearing the alarm_enable<br />
|
|
When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared<br />
|
|
To clear the interrupt write a 1 to the corresponding alarm_irq</div></li><li><div class="item-name"><a class="struct" href="struct.TPIU.html" title="struct rp2040_pac::TPIU">TPIU</a></div><div class="desc docblock-short">Trace Port Interface Unit</div></li><li><div class="item-name"><a class="struct" href="struct.UART0.html" title="struct rp2040_pac::UART0">UART0</a></div><div class="desc docblock-short">UART0</div></li><li><div class="item-name"><a class="struct" href="struct.UART1.html" title="struct rp2040_pac::UART1">UART1</a></div><div class="desc docblock-short">UART1</div></li><li><div class="item-name"><a class="struct" href="struct.USBCTRL_DPRAM.html" title="struct rp2040_pac::USBCTRL_DPRAM">USBCTRL_<wbr>DPRAM</a></div><div class="desc docblock-short">DPRAM layout for USB device.</div></li><li><div class="item-name"><a class="struct" href="struct.USBCTRL_REGS.html" title="struct rp2040_pac::USBCTRL_REGS">USBCTRL_<wbr>REGS</a></div><div class="desc docblock-short">USB FS/LS controller device registers</div></li><li><div class="item-name"><a class="struct" href="struct.VREG_AND_CHIP_RESET.html" title="struct rp2040_pac::VREG_AND_CHIP_RESET">VREG_<wbr>AND_<wbr>CHIP_<wbr>RESET</a></div><div class="desc docblock-short">control and status for on-chip voltage regulator and chip level reset subsystem</div></li><li><div class="item-name"><a class="struct" href="struct.WATCHDOG.html" title="struct rp2040_pac::WATCHDOG">WATCHDOG</a></div><div class="desc docblock-short">WATCHDOG</div></li><li><div class="item-name"><a class="struct" href="struct.XIP_CTRL.html" title="struct rp2040_pac::XIP_CTRL">XIP_<wbr>CTRL</a></div><div class="desc docblock-short">QSPI flash execute-in-place block</div></li><li><div class="item-name"><a class="struct" href="struct.XIP_SSI.html" title="struct rp2040_pac::XIP_SSI">XIP_SSI</a></div><div class="desc docblock-short">DW_apb_ssi has the following features:</div></li><li><div class="item-name"><a class="struct" href="struct.XOSC.html" title="struct rp2040_pac::XOSC">XOSC</a></div><div class="desc docblock-short">Controls the crystal oscillator</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Interrupt.html" title="enum rp2040_pac::Interrupt">Interrupt</a></div><div class="desc docblock-short">Enumeration of all the interrupts.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.NVIC_PRIO_BITS.html" title="constant rp2040_pac::NVIC_PRIO_BITS">NVIC_<wbr>PRIO_<wbr>BITS</a></div><div class="desc docblock-short">Number available in the NVIC for configuring priority</div></li></ul></section></div></main></body></html> |