mirror of
https://github.com/esphome/esphome.git
synced 2025-10-16 08:43:45 +01:00
[nrf52, core] nrf52 core based on zephyr (#7049)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Samuel Sieb <samuel-github@sieb.net> Co-authored-by: Tomasz Duda <tomaszduda23@gmai.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -21,6 +21,7 @@ from esphome.const import (
|
||||
PLATFORM_ESP8266,
|
||||
PLATFORM_HOST,
|
||||
PLATFORM_LN882X,
|
||||
PLATFORM_NRF52,
|
||||
PLATFORM_RP2040,
|
||||
PLATFORM_RTL87XX,
|
||||
)
|
||||
@@ -670,6 +671,10 @@ class EsphomeCore:
|
||||
def is_libretiny(self):
|
||||
return self.is_bk72xx or self.is_rtl87xx or self.is_ln882x
|
||||
|
||||
@property
|
||||
def is_nrf52(self):
|
||||
return self.target_platform == PLATFORM_NRF52
|
||||
|
||||
@property
|
||||
def is_host(self):
|
||||
return self.target_platform == PLATFORM_HOST
|
||||
@@ -686,6 +691,10 @@ class EsphomeCore:
|
||||
def using_esp_idf(self):
|
||||
return self.target_framework == "esp-idf"
|
||||
|
||||
@property
|
||||
def using_zephyr(self):
|
||||
return self.target_framework == "zephyr"
|
||||
|
||||
def add_job(self, func, *args, **kwargs) -> None:
|
||||
self.event_loop.add_job(func, *args, **kwargs)
|
||||
|
||||
|
Reference in New Issue
Block a user