mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-04-16 23:43:15 +00:00
Rename CYW43_USE_PARTITION_FIRMWARE->CYW43_USE_FIRMWARE_PARTITION and CYW43_WIFI_FW_PARTITION_ID->CYW43_FIRMWARE_PARTITION_ID
This commit is contained in:
parent
b31b5443b6
commit
a39f777f14
@ -167,7 +167,7 @@ if (EXISTS ${PICO_CYW43_DRIVER_PATH}/${CYW43_DRIVER_TEST_FILE})
|
||||
if (PICO_PLATFORM STREQUAL "rp2040")
|
||||
message(FATAL_ERROR "RP2040 does not support storing wi-fi firmware in partitions")
|
||||
endif()
|
||||
target_compile_definitions(${TARGET} PRIVATE CYW43_USE_PARTITION_FIRMWARE=1)
|
||||
target_compile_definitions(${TARGET} PRIVATE CYW43_USE_FIRMWARE_PARTITION=1)
|
||||
pico_embed_pt_in_binary(${TARGET} ${PICO_CYW43_DRIVER_CURRENT_PATH}/wifi_pt.json)
|
||||
|
||||
find_package (Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
@ -21,17 +21,12 @@
|
||||
|
||||
static async_context_t *cyw43_async_context = NULL;
|
||||
|
||||
#if CYW43_USE_PARTITION_FIRMWARE
|
||||
#if CYW43_USE_FIRMWARE_PARTITION
|
||||
#include "pico/bootrom.h"
|
||||
#include "hardware/flash.h"
|
||||
#include "boot/picobin.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
// PICO_CONFIG: CYW43_WIFI_FW_PARTITION_ID, ID of Wi-Fi firmware partition, type=int, default=0x776966696669726d (wififirm), group=pico_cyw43_driver
|
||||
#ifndef CYW43_WIFI_FW_PARTITION_ID
|
||||
#define CYW43_WIFI_FW_PARTITION_ID 0x776966696669726d // wififirm
|
||||
#endif
|
||||
|
||||
int32_t cyw43_wifi_fw_len;
|
||||
int32_t cyw43_clm_len;
|
||||
uintptr_t fw_data;
|
||||
@ -120,7 +115,7 @@ static void cyw43_sleep_timeout_reached(async_context_t *context, __unused async
|
||||
}
|
||||
|
||||
bool cyw43_driver_init(async_context_t *context) {
|
||||
#if CYW43_USE_PARTITION_FIRMWARE
|
||||
#if CYW43_USE_FIRMWARE_PARTITION
|
||||
uint32_t buffer[(16 * 4) + 1] = {}; // maximum of 16 partitions, each with maximum of 4 words returned, plus 1
|
||||
int ret = rom_get_partition_table_info(buffer, count_of(buffer), PT_INFO_PARTITION_LOCATION_AND_FLAGS | PT_INFO_PARTITION_ID);
|
||||
|
||||
@ -138,7 +133,7 @@ bool cyw43_driver_init(async_context_t *context) {
|
||||
uint64_t id = 0;
|
||||
id |= buffer[i++];
|
||||
id |= ((uint64_t)(buffer[i++]) << 32ull);
|
||||
if (id == CYW43_WIFI_FW_PARTITION_ID) {
|
||||
if (id == CYW43_FIRMWARE_PARTITION_ID) {
|
||||
picked_p = p;
|
||||
break;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef CYW43_CHIPSET_FIRMWARE_INCLUDE_FILE
|
||||
#if CYW43_USE_PARTITION_FIRMWARE
|
||||
#if CYW43_USE_FIRMWARE_PARTITION
|
||||
#define CYW43_CHIPSET_FIRMWARE_INCLUDE_FILE "cyw43_partition_firmware.h"
|
||||
#else
|
||||
#if CYW43_ENABLE_BLUETOOTH
|
||||
|
@ -20,6 +20,13 @@
|
||||
#include "cyw43_configport.h"
|
||||
#endif
|
||||
|
||||
#if CYW43_USE_FIRMWARE_PARTITION
|
||||
// PICO_CONFIG: CYW43_FIRMWARE_PARTITION_ID, ID of Wi-Fi firmware partition, type=int, default=0x776966696669726d (wififirm), group=pico_cyw43_driver
|
||||
#ifndef CYW43_FIRMWARE_PARTITION_ID
|
||||
#define CYW43_FIRMWARE_PARTITION_ID 0x776966696669726d // wififirm
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user