chipset: more fixes

This commit is contained in:
Matthias Ringwald 2022-06-13 14:59:30 +02:00
parent f495c71240
commit 58080ea6df
3 changed files with 6 additions and 6 deletions

View File

@ -3,4 +3,4 @@
#
# used with AMPAK AP6121 and BCM43438A1
file(DOWNLOAD https://github.com/OpenELEC/misc-firmware/raw/master/firmware/brcm/BCM43430A1.hcd BCM43430A1.hcd)
file(DOWNLOAD https://github.com/OpenELEC/misc-firmware/raw/master/firmware/brcm/BCM43430A1.hcd ${CMAKE_CURRENT_BINARY_DIR}/BCM43430A1.hcd)

View File

@ -20,12 +20,12 @@ function(cc256x_init_script output_file archive main_script optional_script)
# Download init scripts
message("CC256x: Download ${archive}")
file(DOWNLOAD ${BLUEKITCHEN_URL}/${archive} ${archive})
file(DOWNLOAD ${BLUEKITCHEN_URL}/${archive} ${CMAKE_CURRENT_BINARY_DIR}/${archive})
# unpack zip
if (${archive} MATCHES "zip$")
message("CC256x: Extract ${archive}")
file(ARCHIVE_EXTRACT INPUT ${archive})
file(ARCHIVE_EXTRACT INPUT ${CMAKE_CURRENT_BINARY_DIR}/${archive})
endif()
# add custom command to convert bts file(s) into C array
@ -33,8 +33,8 @@ function(cc256x_init_script output_file archive main_script optional_script)
add_custom_command(
OUTPUT ${output_file}
DEPENDS ${main_script} ${optional_script}
COMMAND ${CONVERSION_SCRIPT}
ARGS ${main_script} ${optional_script} ${output_file}
COMMAND python
ARGS ${CONVERSION_SCRIPT} ${main_script} ${optional_script} ${output_file}
)
# Add CC256x chipset support

View File

@ -278,7 +278,7 @@ static uint32_t read_file(FILE **file, uint8_t **buf, const char *name) {
}
// read file
uint8_t ret = fread(*buf, size, 1, *file);
size_t ret = fread(*buf, size, 1, *file);
if (ret != 1) {
log_info("Failed to read %u bytes from file %s (ret = %u)", size, name, ret);
fclose(*file);