mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-27 20:39:33 +01:00
25 lines
22 KiB
HTML
25 lines
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-492a78a4a87dcc01.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.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-3b12f09e550e0385.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><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li></ul></section></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 <a class="mod" href="#">rp2040_pac</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../src/rp2040_pac/lib.rs.html#1-2441">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></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">ROS
|
||
|
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_
|
||
|
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">USBCTR<wbr>L_<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">USBCTR<wbr>L_<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>
|