mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-11 04:48:15 +02:00
@@ -233,7 +233,7 @@ int mbedtls_sha256_update(mbedtls_sha256_context *ctx, const unsigned char *inpu
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char output[32]) {
|
int mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char *output) {
|
||||||
if (ctx->is224) {
|
if (ctx->is224) {
|
||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
uint32_t used;
|
uint32_t used;
|
||||||
|
|||||||
@@ -270,13 +270,12 @@ endif()
|
|||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
pico_stdlib
|
pico_stdlib
|
||||||
pico_multicore
|
pico_multicore
|
||||||
|
pico_rand
|
||||||
|
pico_aon_timer
|
||||||
hardware_flash
|
hardware_flash
|
||||||
hardware_sync
|
|
||||||
hardware_adc
|
|
||||||
pico_unique_id
|
pico_unique_id
|
||||||
tinyusb_device
|
tinyusb_device
|
||||||
tinyusb_board
|
tinyusb_board
|
||||||
hardware_pio
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(PICO_BOARD STREQUAL "pico_w")
|
if(PICO_BOARD STREQUAL "pico_w")
|
||||||
@@ -371,6 +370,7 @@ if(PICO_RP2350)
|
|||||||
set(SOURCES ${SOURCES}
|
set(SOURCES ${SOURCES}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/config/rp2350/alt/sha256_alt.c
|
${CMAKE_CURRENT_LIST_DIR}/config/rp2350/alt/sha256_alt.c
|
||||||
)
|
)
|
||||||
|
set(LIBRARIES ${LIBRARIES} pico_sha256)
|
||||||
endif()
|
endif()
|
||||||
set(INTERNAL_SOURCES ${SOURCES})
|
set(INTERNAL_SOURCES ${SOURCES})
|
||||||
set(SOURCES ${SOURCES} ${EXTERNAL_SOURCES})
|
set(SOURCES ${SOURCES} ${EXTERNAL_SOURCES})
|
||||||
@@ -381,7 +381,7 @@ if(NOT TARGET pico_keys_sdk)
|
|||||||
pico_add_library(pico_keys_sdk)
|
pico_add_library(pico_keys_sdk)
|
||||||
pico_add_extra_outputs(${CMAKE_PROJECT_NAME})
|
pico_add_extra_outputs(${CMAKE_PROJECT_NAME})
|
||||||
|
|
||||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pico_keys_sdk pico_stdlib pico_multicore pico_rand hardware_flash pico_unique_id pico_aon_timer pico_sha256 tinyusb_device tinyusb_board)
|
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
target_sources(pico_keys_sdk INTERFACE ${SOURCES})
|
target_sources(pico_keys_sdk INTERFACE ${SOURCES})
|
||||||
target_include_directories(pico_keys_sdk INTERFACE ${INCLUDES})
|
target_include_directories(pico_keys_sdk INTERFACE ${INCLUDES})
|
||||||
|
|||||||
Reference in New Issue
Block a user