@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
pico_btstack

Integration/wrapper libraries for BTstack the documentation for which is here. More...

## Functions

const hal_flash_bank_t * | pico_flash_bank_instance (void)
| Return the singleton BTstack HAL flash instance, used for non-volatile storage.
const btstack_run_loop_t * | btstack_run_loop_async_context_get_instance (async_context_t *context)
| Initialize and return the singleton BTstack run loop instance that integrates with the async_context API.
void | btstack_run_loop_async_context_deinit (void)
| Deinitialize the BTstack state to stop it using the async_context API.
const btstack_chipset_t * | btstack_chipset_cyw43_instance (void)
| Return the singleton BTstack chipset CY43 API instance.

## Detailed Description

Integration/wrapper libraries for BTstack the documentation for which is here.

A supplemental license for BTstack (in addition to the stock BTstack licensing terms) is provided here.

The `pico_btstack_ble library` adds the support needed for Bluetooth Low Energy (BLE). The `pico_btstack_classic library` adds the support needed for Bluetooth Classic. You can link to either library individually, or to both libraries thus enabling dual-mode support provided by BTstack.

To use BTstack you need to provide a `btstack_config.h` file in your source tree and add its location to your include path. The BTstack configuration macros `ENABLE_CLASSIC` and `ENABLE_BLE` are defined for you when you link the `pico_btstack_classic` and `pico_btstack_ble` libraries respectively, so you should not define them yourself.

For more details, see How to configure BTstack and the relevant pico-examples.

The follow libraries are provided for you to link.

- `pico_btstack_ble -` Adds Bluetooth Low Energy (LE) support.
- `pico_btstack_classic -` Adds Bluetooth Classic support.
- `pico_btstack_sbc_encoder -` Adds Bluetooth Sub Band Coding (SBC) encoder support.
- `pico_btstack_sbc_decoder -` Adds Bluetooth Sub Band Coding (SBC) decoder support.
- `pico_btstack_bnep_lwip -` Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP.
- `pico_btstack_bnep_lwip_sys_freertos -` Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP with FreeRTOS for NO_SYS=0.
- `pico_btstack_mesh -` Adds Bluetooth mesh support from BTstack.

Note
  The CMake function pico_btstack_make_gatt_header can be used to run the BTstack compile_gatt tool to make a GATT header file from a BTstack GATT file.

See also
  pico_btstack_cyw43 in pico_cyw43_driver, which adds the cyw43 driver support needed for BTstack including BTstack run loop support.

## Function Documentation

## btstack_run_loop_async_context_get_instance()

const btstack_run_loop_t * btstack_run_loop_async_context_get_instance | ( | async_context_t * | context | ) |

Initialize and return the singleton BTstack run loop instance that integrates with the async_context API.

Parameters

  context | the async_context instance that provides the abstraction for handling asynchronous work.

Returns
  the BTstack run loop instance

## pico_flash_bank_instance()

const hal_flash_bank_t * pico_flash_bank_instance | ( | void |  | ) |

Return the singleton BTstack HAL flash instance, used for non-volatile storage.

Note
  By default, two sectors near the end of flash are used. For RP2350 when PICO_RP2350_A2_SUPPORTED is true, two sectors that are three sectors from the end of flash are used. This keeps the last sector free for a workaround for chip errata RP2350-E10. See the RP2350 datasheet for more details about this. Otherwise, two sectors directly at the end of flash are used. See `PICO_FLASH_BANK_STORAGE_OFFSET` and `PICO_FLASH_BANK_TOTAL_SIZE`)