forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ana_cmpr): make analog comparator driver as component
- Loading branch information
Showing
34 changed files
with
82 additions
and
62 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,15 @@ | ||
set(srcs) | ||
|
||
# Analog comparator related source files | ||
if(CONFIG_SOC_ANA_CMPR_SUPPORTED) | ||
list(APPEND srcs "ana_cmpr.c") | ||
if(CONFIG_SOC_ANA_CMPR_SUPPORT_ETM) | ||
list(APPEND srcs "ana_cmpr_etm.c") | ||
endif() | ||
endif() | ||
|
||
idf_component_register(SRCS ${srcs} | ||
INCLUDE_DIRS "include" | ||
PRIV_REQUIRES esp_pm esp_driver_gpio | ||
LDFRAGMENTS "linker.lf" | ||
) |
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,24 @@ | ||
menu "ESP-Driver:Analog Comparator Configurations" | ||
depends on SOC_ANA_CMPR_SUPPORTED | ||
config ANA_CMPR_ISR_IRAM_SAFE | ||
bool "Analog comparator ISR IRAM-Safe" | ||
default n | ||
help | ||
Ensure the Analog Comparator interrupt is IRAM-Safe by allowing the interrupt handler to be | ||
executable when the cache is disabled (e.g. SPI Flash write). | ||
|
||
config ANA_CMPR_CTRL_FUNC_IN_IRAM | ||
bool "Place Analog Comparator control functions into IRAM" | ||
default n | ||
help | ||
Place Analog Comparator control functions (like ana_cmpr_set_internal_reference) into IRAM, | ||
so that these functions can be IRAM-safe and able to be called in an IRAM interrupt context. | ||
Enabling this option can improve driver performance as well. | ||
|
||
config ANA_CMPR_ENABLE_DEBUG_LOG | ||
bool "Enable debug log" | ||
default n | ||
help | ||
Wether to enable the debug log message for Analog Comparator driver. | ||
Note that, this option only controls the Analog Comparator driver log, won't affect other drivers. | ||
endmenu # Analog Comparator Configuration |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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 @@ | ||
[mapping:ana_cmpr_driver] | ||
archive: libesp_driver_ana_cmpr.a | ||
entries: | ||
if ANA_CMPR_CTRL_FUNC_IN_IRAM = y: | ||
ana_cmpr: ana_cmpr_set_internal_reference (noflash) | ||
ana_cmpr: ana_cmpr_set_debounce (noflash) | ||
ana_cmpr: ana_cmpr_set_cross_type (noflash) |
12 changes: 12 additions & 0 deletions
12
components/esp_driver_ana_cmpr/test_apps/.build-test-rules.yml
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,12 @@ | ||
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps | ||
|
||
components/esp_driver_ana_cmpr/test_apps/analog_comparator: | ||
disable: | ||
- if: SOC_ANA_CMPR_SUPPORTED != 1 | ||
disable_test: | ||
- if: IDF_TARGET == "esp32p4" | ||
temporary: true | ||
reason: not supported yet | ||
depends_components: | ||
- esp_driver_gpio | ||
- esp_driver_ana_cmpr |
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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