Add get_board function to esp32 module (#5184)

This commit is contained in:
Jesse Hills 2023-08-02 16:24:02 +12:00 committed by GitHub
parent e02aaedc42
commit 581cb642ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,6 +81,10 @@ def get_esp32_variant(core_obj=None):
return (core_obj or CORE).data[KEY_ESP32][KEY_VARIANT]
def get_board(core_obj=None):
return (core_obj or CORE).data[KEY_ESP32][KEY_BOARD]
def only_on_variant(*, supported=None, unsupported=None):
"""Config validator for features only available on some ESP32 variants."""
if supported is not None and not isinstance(supported, list):