Add missing config docs for overriding libs

Adds some docs for pico_mbedtls
Documents the config for overriding the code in pico-sdk/libs
This commit is contained in:
Peter Harper 2025-04-08 13:00:28 +01:00
parent e6dabbc398
commit 4cacd246ab
8 changed files with 18 additions and 1 deletions

View File

@ -80,6 +80,7 @@
* \defgroup tinyusb_device tinyusb_device
* \defgroup tinyusb_host tinyusb_host
* \endcond
* \cond pico_mbedtls \defgroup pico_mbedtls pico_mbedtls \endcond
* @}
*
* \defgroup networking Networking Libraries

View File

@ -1,3 +1,4 @@
# PICO_CMAKE_CONFIG: PICO_BTSTACK_PATH, Path to an alternative version of btstack overriding the version in pico-sdk/libs/btstack. Can be passed to cmake or set in your environment, type=string, group=pico_btstack
if (DEFINED ENV{PICO_BTSTACK_PATH} AND (NOT PICO_BTSTACK_PATH))
set(PICO_BTSTACK_PATH $ENV{PICO_BTSTACK_PATH})
message("Using PICO_BTSTACK_PATH from environment ('${PICO_BTSTACK_PATH}')")

View File

@ -1,3 +1,4 @@
# PICO_CMAKE_CONFIG: PICO_CYW43_DRIVER_PATH, Path to an alternative version of cyw43-driver overriding the version in pico-sdk/libs/cyw43-driver, type=string, group=pico_cyw43_driver
if (DEFINED ENV{PICO_CYW43_DRIVER_PATH} AND (NOT PICO_CYW43_DRIVER_PATH))
set(PICO_CYW43_DRIVER_PATH $ENV{PICO_CYW43_DRIVER_PATH})
message("Using PICO_CYW43_DRIVER_PATH from environment ('${PICO_CYW43_DRIVER_PATH}')")

View File

@ -1,3 +1,4 @@
# PICO_CMAKE_CONFIG: PICO_LWIP_PATH, Path to an alternative version of lwip overriding the version in pico-sdk/libs/lwip. Can be passed to cmake or set in your environment, type=string, group=pico_lwip
if (DEFINED ENV{PICO_LWIP_PATH} AND (NOT PICO_LWIP_PATH))
set(PICO_LWIP_PATH $ENV{PICO_LWIP_PATH})
message("Using PICO_LWIP_PATH from environment ('${PICO_LWIP_PATH}')")

View File

@ -1,3 +1,4 @@
# PICO_CMAKE_CONFIG: PICO_MBEDTLS_PATH, Path to an alternative version of mbedtls overriding the version in pico-sdk/libs/mbedtls. Can be passed to cmake or set in your environment, type=string, group=pico_mbedtls
if (DEFINED ENV{PICO_MBEDTLS_PATH} AND (NOT PICO_MBEDTLS_PATH))
set(PICO_MBEDTLS_PATH $ENV{PICO_MBEDTLS_PATH})
message("Using PICO_MBEDTLS_PATH from environment ('${PICO_MBEDTLS_PATH}')")

View File

@ -0,0 +1,11 @@
/**
* \defgroup pico_mbedtls pico_mbedtls
* \brief pico-sdk wrapper library for <a href="https://github.com/Mbed-TLS/mbedtls.git">mbedtls</a>
* the documentation for which is <a href="https://mbed-tls.readthedocs.io/en/latest/">here</a>.
*
* Builds mbedtls for pico-sdk and implements functions to take advantage of hardware support, if enabled in mbedtls_config.h
*
* * \c \b MBEDTLS_ENTROPY_HARDWARE_ALT, implementation of a hardware entropy collector that uses \ref get_rand_64
* * \c \b MBEDTLS_SHA256_ALT, use SHA256 hardware acceleration. Only valid if LIB_PICO_SHA256 is defined (i.e. not available for rp2040)
*
*/

View File

@ -27,7 +27,7 @@ int mbedtls_hardware_poll(void *data __unused, unsigned char *output, size_t len
#error SHA256 hardware acceleration not supported
#endif
// PICO_CONFIG: PICO_MBEDTLS_SHA256_ALT_USE_DMA, Whether to use DMA for writing to hardware for the mbedtls SHA-256 hardware acceleration, type=int, default=1, group=pico_stdlib
// PICO_CONFIG: PICO_MBEDTLS_SHA256_ALT_USE_DMA, Whether to use DMA for writing to hardware for the mbedtls SHA-256 hardware acceleration, type=int, default=1, group=pico_mbedtls
#ifndef PICO_MBEDTLS_SHA256_ALT_USE_DMA
#define PICO_MBEDTLS_SHA256_ALT_USE_DMA 1
#endif

View File

@ -1,3 +1,4 @@
# PICO_CMAKE_CONFIG: PICO_TINYUSB_PATH, Path to an alternative version of tinyusb overriding the version in pico-sdk/libs/tinyusb. Can be passed to cmake or set in your environment, type=string, group=tinyusb_device
if (DEFINED ENV{PICO_TINYUSB_PATH} AND (NOT PICO_TINYUSB_PATH))
set(PICO_TINYUSB_PATH $ENV{PICO_TINYUSB_PATH})
message("Using PICO_TINYUSB_PATH from environment ('${PICO_TINYUSB_PATH}')")