Skip to content

Commit

Permalink
change link
Browse files Browse the repository at this point in the history
  • Loading branch information
daschr committed Nov 19, 2023
1 parent 7bc955b commit bba1e05
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/esp_pwm_reader/enum.CaptureTimerError.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/esp_pwm_reader/enum.ChannelReaderError.html

Large diffs are not rendered by default.

37 changes: 36 additions & 1 deletion docs/esp_pwm_reader/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
<!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="API documentation for the Rust `esp_pwm_reader` crate."><title>esp_pwm_reader - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="esp_pwm_reader" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (2fba83302 2023-10-18) (1.73.0.1)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-1596385f77d47ef2.css" data-theme-dark-css="dark-0a43001d3fc2282c.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-1596385f77d47ef2.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-0a43001d3fc2282c.css"><link rel="stylesheet" href="../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><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">&#9776;</button><a class="logo-container" href="../esp_pwm_reader/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../esp_pwm_reader/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate esp_pwm_reader</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.1.1</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">esp_pwm_reader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/esp_pwm_reader/lib.rs.html#1-242">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.CaptureTimer.html" title="struct esp_pwm_reader::CaptureTimer">CaptureTimer</a></div><div class="desc docblock-short">This timer is used by a capture Channel insinde a ChannelReader.
<!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="esp_pwm_reader"><title>esp_pwm_reader - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-cb6f1f67f1bcd037.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="esp_pwm_reader" data-themes="" data-resource-suffix="" data-rustdoc-version="1.73.0-nightly (2fba83302 2023-10-18) (1.73.0.1)" data-channel="nightly" data-search-js="search-6dfdfced5eff6596.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-1596385f77d47ef2.css" data-theme-dark-css="dark-0a43001d3fc2282c.css" data-theme-ayu-css="ayu-fd19013d6ce078bf.css" ><script src="../static.files/storage-db41da1a38ea3cb8.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-1596385f77d47ef2.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-0a43001d3fc2282c.css"><link rel="stylesheet" href="../static.files/noscript-cffde32267a19fd6.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><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">&#9776;</button><a class="logo-container" href="../esp_pwm_reader/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../esp_pwm_reader/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate esp_pwm_reader</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.1.2</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">esp_pwm_reader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/esp_pwm_reader/lib.rs.html#1-243">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="esp_pwm_reader"><a href="#esp_pwm_reader">esp_pwm_reader</a></h2>
<p>Wrapper around the mcpwm capture module for reading pwm signals.</p>
<h2 id="documentation"><a href="#documentation">Documentation</a></h2>
<ul>
<li>see <a href="https://daschr.github.io/esp_pwm_reader/esp_pwm_reader/index.html">https://daschr.github.io/esp_pwm_reader/esp_pwm_reader/index.html</a></li>
</ul>
<h2 id="usage"><a href="#usage">Usage</a></h2>
<ul>
<li>you need to create a capture timer which can then be used by multiple channel readers</li>
<li>f.e.
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>channel_reader::{CaptureTimer, ChannelReader};
<span class="kw">use </span>esp_idf_hal::delay::FreeRtos;

<span class="kw">use </span>esp_idf_sys::{
gpio_num_t_GPIO_NUM_16, gpio_num_t_GPIO_NUM_17
};

<span class="kw">fn </span>main() {
<span class="kw">let </span>capture_timer = CaptureTimer::new(<span class="number">0</span>).unwrap();

<span class="kw">let </span>channel1 = ChannelReader::new(<span class="kw-2">&amp;</span>capture_timer, gpio_num_t_GPIO_NUM_16).unwrap();
<span class="kw">let </span>channel2 = ChannelReader::new(<span class="kw-2">&amp;</span>capture_timer, gpio_num_t_GPIO_NUM_17).unwrap();

<span class="kw">loop </span>{
<span class="macro">println!</span>(
<span class="string">&quot;ch1: {} ch2: {}&quot;</span>,
channel1.get_value(),
channel2.get_value()
);

FreeRtos::delay_ms(<span class="number">11</span>);
}
}</code></pre></div>
</li>
</ul>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.CaptureTimer.html" title="struct esp_pwm_reader::CaptureTimer">CaptureTimer</a></div><div class="desc docblock-short">This timer is used by a capture Channel insinde a ChannelReader.
It can be used by multiple ChannelReader instance.
Also see <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/mcpwm.html?highlight=mcpwm_new_capture_timer#capture">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/mcpwm.html?highlight=mcpwm_new_capture_timer#capture</a></div></li><li><div class="item-name"><a class="struct" href="struct.ChannelReader.html" title="struct esp_pwm_reader::ChannelReader">ChannelReader</a></div><div class="desc docblock-short">Can read the current value of the PWM signal on the specified pin in microseconds</div></li></ul><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.CaptureTimerError.html" title="enum esp_pwm_reader::CaptureTimerError">CaptureTimerError</a></div><div class="desc docblock-short">Errors which can occur by calls to the mcpwm submodule of the esp-idf at different stages.
See mcpwm_capture_timer_enable ff.: <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/mcpwm.html?highlight=mcpwm_new_capture_timer#_CPPv426mcpwm_capture_timer_enable24mcpwm_cap_timer_handle_t">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/mcpwm.html?highlight=mcpwm_new_capture_timer#_CPPv426mcpwm_capture_timer_enable24mcpwm_cap_timer_handle_t</a></div></li><li><div class="item-name"><a class="enum" href="enum.ChannelReaderError.html" title="enum esp_pwm_reader::ChannelReaderError">ChannelReaderError</a></div><div class="desc docblock-short">Errors which can occur by calls to the mcpwm submodule of the esp-idf at different stages.
Expand Down
Loading

0 comments on commit bba1e05

Please sign in to comment.