mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-06 07:00:59 +00:00
chipset: more fixes
This commit is contained in:
parent
f495c71240
commit
58080ea6df
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user