module documentation

Decorators for feature availability checks.

Function audio_required Decorator to check if Audio is available.
Function bluetooth_required Decorator to check if Bluetooth is available.
Function native Decorator to wrap a function with micropython.native.
Function psram_required Decorator to check if PSRAM is available.
Function storage_required Decorator to check if storage is available.
Function viper Decorator to wrap a function with micropython.viper.
Function wifi_required Decorator to check if WiFi is available.
def audio_required(func: callable) -> callable:

Decorator to check if Audio is available.

Parameters
func:callableThe function to decorate.
Returns
callableThe wrapped function, or a stub that raises when audio is missing.
Raises
RuntimeErrorIf the decorated function is called without audio support.
def bluetooth_required(func: callable) -> callable:

Decorator to check if Bluetooth is available.

Parameters
func:callableThe function to decorate.
Returns
callableThe wrapped function, or a stub that raises when Bluetooth is missing.
Raises
RuntimeErrorIf the decorated function is called without Bluetooth support.
def native(func: callable) -> callable:

Decorator to wrap a function with micropython.native.

Parameters
func:callableThe function to decorate.
Returns
callableThe function, wrapped with micropython.native on supported boards.
def psram_required(func: callable) -> callable:

Decorator to check if PSRAM is available.

Parameters
func:callableThe function to decorate.
Returns
callableThe wrapped function, or a stub that raises when PSRAM is missing.
Raises
RuntimeErrorIf the decorated function is called without PSRAM support.
def storage_required(func: callable) -> callable:

Decorator to check if storage is available.

Parameters
func:callableThe function to decorate.
Returns
callableThe wrapped function, or a stub that raises when storage is missing.
Raises
RuntimeErrorIf the decorated function is called without SD storage support.
def viper(func: callable) -> callable:

Decorator to wrap a function with micropython.viper.

Parameters
func:callableThe function to decorate.
Returns
callableThe function, wrapped with micropython.viper on supported boards.
def wifi_required(func: callable) -> callable:

Decorator to check if WiFi is available.

Parameters
func:callableThe function to decorate.
Returns
callableThe wrapped function, or a stub that raises when WiFi is missing.
Raises
RuntimeErrorIf the decorated function is called without WiFi connected.