Skip to content

Commit

Permalink
doc: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 committed Mar 11, 2024
1 parent 0678002 commit f07e470
Show file tree
Hide file tree
Showing 103 changed files with 1,250 additions and 394 deletions.
21 changes: 10 additions & 11 deletions docs/_sources/button.rst.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
Button APIs
***********

The `Button` class provides a simple wrapper around the ESP-IDF gpio API to
provide a simple interface for reading the state of a button. The class sets the
GPIO pin to input mode and installs an ISR to detect button presses. The ISR
sends data to the `Button`'s queue which is read by the `Button`'s task. The
task periodically checks the queue for new data and updates the button state
accordingly, additionally calling the provided callback function if one was
registered.
The `Button` class provides a simple way to read the state of a button. There
are two ways to configure the functionality of the button.

Note: the data passed to the callback function is a `espp::Button::Event` object
which contains the button's state and the gpio associated with the button.
The first uses `Button::Config` to configure the button to call a function when
the button is pressed or released and uses the `Interrupt` class' task and ISR
for signaling. At any time, a user may also call the `is_pressed` method to read
the current state of the button's input pin.

Additionally, users can check the state of the button by calling the
`is_pressed` method.
The second uses `Button::SimpleConfig` to simply configure the button as an
input with configurable pull-up or pull-down resistors and a configurable active
state (high or low). In this configuration, the input is read manually any time
the user calls the `is_pressed` method.

.. ---------------------------- API Reference ----------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This is the documentation for esp-idf c++ components, ESPP (`espp <https://githu
haptics/index
hid/index
i2c
interrupt
input/index
io_expander/index
joystick
Expand Down
22 changes: 22 additions & 0 deletions docs/_sources/interrupt.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Interrupt APIs
**************

The `Interrupt` class provides APIs to register interrupt handlers for GPIO and
configure the interrupts. Interrupts can be configured to trigger on rising
edge, falling edge, high level, low level, or any change in the input signal. A
single interrupt object can manage multiple GPIO pins with separate callbacks
for each GPIO, or separte `Interrupt` objects can be created (though that uses
more memory and CPU as each `Interrupt` will has its own queue, ISR handler, and
task.

Finally, the `Interrupt` class is also designed to be subclassed if desired to
provide additional functionality, or it can of course be included as a member
within another class. The Button class provides a very simple implementation of
a subclass of `Interrupt`.

.. ---------------------------- API Reference ----------------------------------
API Reference
-------------

.. include-build-file:: inc/interrupt.inc
3 changes: 2 additions & 1 deletion docs/adc/adc_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -150,7 +151,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADC Types</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/adc_types.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/adc_types.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down
5 changes: 3 additions & 2 deletions docs/adc/ads1x15.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -151,7 +152,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADS1x15 I2C ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/ads1x15.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/ads1x15.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -168,7 +169,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/2b7c5c1d/components/ads1x15/include/ads1x15.hpp">components/ads1x15/include/ads1x15.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/06780020/components/ads1x15/include/ads1x15.hpp">components/ads1x15/include/ads1x15.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
5 changes: 3 additions & 2 deletions docs/adc/ads7138.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -151,7 +152,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADS7138 I2C ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/ads7138.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/ads7138.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -173,7 +174,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/2b7c5c1d/components/ads7138/include/ads7138.hpp">components/ads7138/include/ads7138.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/06780020/components/ads7138/include/ads7138.hpp">components/ads7138/include/ads7138.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
5 changes: 3 additions & 2 deletions docs/adc/continuous_adc.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -151,7 +152,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>Continuous ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/continuous_adc.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/continuous_adc.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -173,7 +174,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/2b7c5c1d/components/adc/include/continuous_adc.hpp">components/adc/include/continuous_adc.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/06780020/components/adc/include/continuous_adc.hpp">components/adc/include/continuous_adc.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
3 changes: 2 additions & 1 deletion docs/adc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -143,7 +144,7 @@
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>ADC APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/index.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/index.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down
5 changes: 3 additions & 2 deletions docs/adc/oneshot_adc.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -151,7 +152,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>Oneshot ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/oneshot_adc.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/oneshot_adc.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -172,7 +173,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/2b7c5c1d/components/adc/include/oneshot_adc.hpp">components/adc/include/oneshot_adc.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/06780020/components/adc/include/oneshot_adc.hpp">components/adc/include/oneshot_adc.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
5 changes: 3 additions & 2 deletions docs/adc/tla2528.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li class="toctree-l1"><a class="reference internal" href="../haptics/index.html">Haptics APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hid/index.html">HID APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../i2c.html">I2C</a></li>
<li class="toctree-l1"><a class="reference internal" href="../interrupt.html">Interrupt APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../input/index.html">Input APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../io_expander/index.html">IO Expander APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../joystick.html">Joystick APIs</a></li>
Expand Down Expand Up @@ -151,7 +152,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>TLA2528 I2C ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/c6cafffd/docs/en/adc/tla2528.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/06780020/docs/en/adc/tla2528.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -173,7 +174,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/2b7c5c1d/components/tla2528/include/tla2528.hpp">components/tla2528/include/tla2528.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/06780020/components/tla2528/include/tla2528.hpp">components/tla2528/include/tla2528.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
Loading

0 comments on commit f07e470

Please sign in to comment.