Skip to content

Commit

Permalink
esp32[s2|s3]: Add temperature sensor support
Browse files Browse the repository at this point in the history
  • Loading branch information
eren-terzioglu committed Jul 26, 2024
1 parent 429711f commit 6b890b8
Show file tree
Hide file tree
Showing 8 changed files with 718 additions and 0 deletions.
16 changes: 16 additions & 0 deletions arch/xtensa/src/common/espressif/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,19 @@ config ESP_MCPWM
---help---
Enable support for timer capture and motor control using
the Motor Control PWM peripheral.

config ESPRESSIF_TEMP
bool "Internal Temperature Sensor"
default n
depends on ARCH_CHIP_ESP32S2 || ARCH_CHIP_ESP32S3
---help---
A built-in sensor used to measure the chip's internal temperature.

menu "Internal Temperature Sensor Configuration"
depends on ESPRESSIF_TEMP

config ESPRESSIF_TEMP_PATH
string "Internal Temperature Sensor Path"
default "dev/temp"

endmenu # ESPRESSIF_TEMP
4 changes: 4 additions & 0 deletions arch/xtensa/src/common/espressif/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ ifeq ($(filter $(CONFIG_ESPRESSIF_SIMPLE_BOOT) \
CHIP_CSRCS += esp_loader.c
endif

ifeq ($(CONFIG_ESPRESSIF_TEMP),y)
CHIP_CSRCS += esp_temperature_sensor.c
endif

INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif$(DELIM)platform_include
Loading

0 comments on commit 6b890b8

Please sign in to comment.