mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 09:25:34 +00:00
[nrf52] prepare for usb cdc (#14174)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
This commit is contained in:
@@ -464,6 +464,8 @@ def only_on_variant(*, supported=None, unsupported=None, msg_prefix="This featur
|
||||
unsupported = [unsupported]
|
||||
|
||||
def validator_(obj):
|
||||
if not CORE.is_esp32:
|
||||
raise cv.Invalid(f"{msg_prefix} is only available on ESP32")
|
||||
variant = get_esp32_variant()
|
||||
if supported is not None and variant not in supported:
|
||||
raise cv.Invalid(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(USE_ESP32)
|
||||
#if defined(USE_ESP32) || defined(USE_ZEPHYR)
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
|
||||
Reference in New Issue
Block a user