-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/zero_detection_support_ci' into 'master'
Feature/zero detection support ci See merge request ae_group/esp-iot-solution!895
- Loading branch information
Showing
19 changed files
with
408 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ChangeLog | ||
|
||
## v0.0.1 - 2023-11-28 | ||
|
||
First release version. | ||
|
||
- Support zero_cross_detection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
[![Component Registry](https://components.espressif.com/components/espressif/button/badge.svg)](https://components.espressif.com/components/espressif/button) | ||
[![Component Registry](https://components.espressif.com/components/espressif/zero_detection/badge.svg)](https://components.espressif.com/components/espressif/zero_detection) | ||
|
||
# Component: Zero_Detection | ||
[Online documentation](https://docs.espressif.com/projects/esp-iot-solution/en/latest/input_device/button.html) | ||
|
||
The zero cross detection driver is a component designed to analyze zero cross signals. By examining the period and triggering edges of zero cross signals, it can determine the signal's validity, invalidity, whether it exceeds the expected frequency range, and if there are signal losses. | ||
|
||
The program returns results in the form of events, meeting the user's need for timely signal processing. Additionally, it supports the analysis of two types of zero cross signals, including square waveforms and pulse types. | ||
|
||
After creating a new zero detection object by calling function `zero_detect_create()`, the zero detection object can create many events. | ||
|
||
List of supported events: | ||
* Button pressed | ||
* Button released | ||
* Button pressed repeat | ||
* Button press repeat done | ||
* Button single click | ||
* Button double click | ||
* Button multiple click | ||
* Button long press start | ||
* Button long press hold | ||
* Button long press up | ||
|
||
![](https://dl.espressif.com/button_v2/button.svg) | ||
|
||
There are three ways this driver can handle buttons: | ||
1. Buttons connected to standard digital GPIO | ||
2. Multiple buttons connected to single ADC channel | ||
3. Custom button connect to any driver | ||
* SIGNAL_FREQ_OUT_OF_RANGE | ||
* SIGNAL_VALID | ||
* SIGNAL_INVALID | ||
* SIGNAL_LOST | ||
* SIGNAL_RISING_EDGE | ||
* SIGNAL_FALLING_EDGE | ||
|
||
Users have the flexibility to configure the program's drive modes, including MCPWM capture and GPIO interrupt. Furthermore, users can adjust parameters such as the effective frequency range and the number of valid signal judgments, providing a high level of flexibility. | ||
|
||
There are two ways this driver can handle signal: | ||
1. Analyzing and collecting signals using GPIO interrupts | ||
2. Using GPIO for signal collection and analysis | ||
|
||
## Add component to your project | ||
|
||
Please use the component manager command `add-dependency` to add the `zero_detection` to your project's dependency, during the `CMake` step the component will be downloaded automatically | ||
|
||
``` | ||
idf.py add-dependency "espressif/zero_detection=*" | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: "0.0.1" | ||
description: Zero Cross Detection Driver | ||
url: https://github.com/espressif/esp-iot-solution/tree/master/components/zero_detection | ||
dependencies: | ||
idf: ">=5.0" | ||
espressif/cmake_utilities: "0.*" | ||
examples: | ||
- path: ../../examples/zero_cross_detection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# The following lines of boilerplate have to be in your project's CMakeLists | ||
# in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components" | ||
"../../zero_detection") | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(zero_cross_detecion_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
idf_component_register(SRC_DIRS "." | ||
PRIV_INCLUDE_DIRS "." | ||
PRIV_REQUIRES unity test_utils zero_detection) |
Oops, something went wrong.