Repository: raspberrypi/pico-sdk
File: src/rp2_common/pico_cyw43_driver/include/pico/cyw43_driver.h (C/C++)

Code before:
/*
 * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef _PICO_CYW43_DRIVER_H
#define _PICO_CYW43_DRIVER_H

/** \file pico/cyw43_driver.h
 *  \defgroup pico_cyw43_driver pico_cyw43_driver
 *
 * \brief A wrapper around the lower level cyw43_driver, that integrates it with \ref pico_async_context
 * for handling background work
 */

#include "pico.h"

#if CYW43_PIN_WL_DYNAMIC
#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

struct async_context;

/*! \brief Initializes the lower level cyw43_driver and integrates it with the provided async_context
 *  \ingroup pico_cyw43_driver
 *
 *  If the initialization succeeds, \ref lwip_nosys_deinit() can be called to shutdown lwIP support
 *
 * \param context the async_context instance that provides the abstraction for handling asynchronous work.
 * \return true if the initialization succeeded
*/
bool cyw43_driver_init(struct async_context *context);

/*! \brief De-initialize the lowever level cyw43_driver and unhooks it from the async_context
 *  \ingroup pico_cyw43_driver
 *
 * \param context the async_context the cyw43_driver support was added to via \ref cyw43_driver_init
*/
void cyw43_driver_deinit(struct async_context *context);

Review comment (suggestion):
Should this be the same as `CYW43_FIRMWARE_FAMILY_ID` in `uf2.h` or am I woefully misunderstanding something? :confused: 

Code after:
/*
 * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef _PICO_CYW43_DRIVER_H
#define _PICO_CYW43_DRIVER_H

/** \file pico/cyw43_driver.h
 *  \defgroup pico_cyw43_driver pico_cyw43_driver
 *
 * \brief A wrapper around the lower level cyw43_driver, that integrates it with \ref pico_async_context
 * for handling background work
 */

#include "pico.h"

#if CYW43_PIN_WL_DYNAMIC
#include "cyw43_configport.h"
#endif

#if CYW43_USE_FIRMWARE_PARTITION
// PICO_CONFIG: CYW43_FIRMWARE_PARTITION_ID, ID of Wi-Fi firmware partition which must match the ID used in the partition table JSON, type=int, default=0x776966696669726d, group=pico_cyw43_driver
#ifndef CYW43_FIRMWARE_PARTITION_ID
// The default 0x776966696669726d value is the ASCII encoding of "wififirm"
#define CYW43_FIRMWARE_PARTITION_ID 0x776966696669726d
#endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

struct async_context;

/*! \brief Initializes the lower level cyw43_driver and integrates it with the provided async_context
 *  \ingroup pico_cyw43_driver
 *
 *  If the initialization succeeds, \ref lwip_nosys_deinit() can be called to shutdown lwIP support
 *
 * \param context the async_context instance that provides the abstraction for handling asynchronous work.
 * \return true if the initialization succeeded
*/
bool cyw43_driver_init(struct async_context *context);

/*! \brief De-initialize the lowever level cyw43_driver and unhooks it from the async_context
 *  \ingroup pico_cyw43_driver
 *
 * \param context the async_context the cyw43_driver support was added to via \ref cyw43_driver_init
*/