mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
ESP_PCNT: add high and low limit Kconfig options
Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
This commit is contained in:
committed by
Alan C. Assis
parent
d7a05dfcc6
commit
150854c6f2
@@ -682,6 +682,22 @@ config ESP_PCNT_TEST_MODE
|
||||
to the receiver internally, being able to test the PCNT
|
||||
peripheral without any external connection.
|
||||
|
||||
config ESP_PCNT_HIGH_LIMIT
|
||||
int "PCNT high limit value"
|
||||
default 1024
|
||||
range 1 32767
|
||||
---help---
|
||||
This sets thr_h_lim value for all units. When pulse_cnt reaches
|
||||
this value, the counter will be cleared.
|
||||
|
||||
config ESP_PCNT_LOW_LIMIT
|
||||
int "PCNT low limit value"
|
||||
default -1024
|
||||
range -32768 -1
|
||||
---help---
|
||||
This sets thr_l_lim value for all units. When pulse_cnt reaches
|
||||
this value, the counter will be cleared.
|
||||
|
||||
config ESP_PCNT_AS_QE
|
||||
bool
|
||||
default n
|
||||
|
||||
@@ -348,6 +348,22 @@ config ESP_PCNT_TEST_MODE
|
||||
to the receiver internally, being able to test the PCNT
|
||||
peripheral without any external connection.
|
||||
|
||||
config ESP_PCNT_HIGH_LIMIT
|
||||
int "PCNT high limit value"
|
||||
default 1024
|
||||
range 1 32767
|
||||
---help---
|
||||
This sets thr_h_lim value for all units. When pulse_cnt reaches
|
||||
this value, the counter will be cleared.
|
||||
|
||||
config ESP_PCNT_LOW_LIMIT
|
||||
int "PCNT low limit value"
|
||||
default -1024
|
||||
range -32768 -1
|
||||
---help---
|
||||
This sets thr_l_lim value for all units. When pulse_cnt reaches
|
||||
this value, the counter will be cleared.
|
||||
|
||||
config ESP_PCNT_AS_QE
|
||||
bool
|
||||
default n
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define PCNT_HIGH_LIMIT 1000
|
||||
#define PCNT_LOW_LIMIT -1000
|
||||
#define PCNT_HIGH_LIMIT CONFIG_ESP_PCNT_HIGH_LIMIT
|
||||
#define PCNT_LOW_LIMIT CONFIG_ESP_PCNT_LOW_LIMIT
|
||||
|
||||
#define PCNT_GLITCH_FILTER(pcnt, thres) pcnt->ops->ioctl(pcnt, \
|
||||
CAPIOC_FILTER, \
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define PCNT_HIGH_LIMIT 1000
|
||||
#define PCNT_LOW_LIMIT -1000
|
||||
#define PCNT_HIGH_LIMIT CONFIG_ESP_PCNT_HIGH_LIMIT
|
||||
#define PCNT_LOW_LIMIT CONFIG_ESP_PCNT_LOW_LIMIT
|
||||
|
||||
#define PCNT_GLITCH_FILTER(pcnt, thres) pcnt->ops->ioctl(pcnt, \
|
||||
CAPIOC_FILTER, \
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define PCNT_HIGH_LIMIT 1000
|
||||
#define PCNT_LOW_LIMIT -1000
|
||||
#define PCNT_HIGH_LIMIT CONFIG_ESP_PCNT_HIGH_LIMIT
|
||||
#define PCNT_LOW_LIMIT CONFIG_ESP_PCNT_LOW_LIMIT
|
||||
|
||||
#define PCNT_GLITCH_FILTER(pcnt, thres) pcnt->ops->ioctl(pcnt, \
|
||||
CAPIOC_FILTER, \
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define PCNT_HIGH_LIMIT 1000
|
||||
#define PCNT_LOW_LIMIT -1000
|
||||
#define PCNT_HIGH_LIMIT CONFIG_ESP_PCNT_HIGH_LIMIT
|
||||
#define PCNT_LOW_LIMIT CONFIG_ESP_PCNT_LOW_LIMIT
|
||||
|
||||
#define PCNT_GLITCH_FILTER(pcnt, thres) pcnt->ops->ioctl(pcnt, \
|
||||
CAPIOC_FILTER, \
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define PCNT_HIGH_LIMIT 1000
|
||||
#define PCNT_LOW_LIMIT -1000
|
||||
#define PCNT_HIGH_LIMIT CONFIG_ESP_PCNT_HIGH_LIMIT
|
||||
#define PCNT_LOW_LIMIT CONFIG_ESP_PCNT_LOW_LIMIT
|
||||
|
||||
#define PCNT_GLITCH_FILTER(pcnt, thres) pcnt->ops->ioctl(pcnt, \
|
||||
CAPIOC_FILTER, \
|
||||
|
||||
Reference in New Issue
Block a user