v2.0.0
btstack_flash_bank.h
1/*
2 * Copyright (c) 2023 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_BTSTACK_FLASH_BANK_H
8#define _PICO_BTSTACK_FLASH_BANK_H
9
10#include "pico.h"
11#include "hardware/flash.h"
12#include "hal_flash_bank.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18// PICO_CONFIG: PICO_FLASH_BANK_TOTAL_SIZE, Total size of the Bluetooth flash storage. Must be an even multiple of FLASH_SECTOR_SIZE, type=int, default=FLASH_SECTOR_SIZE * 2, group=pico_btstack
19#ifndef PICO_FLASH_BANK_TOTAL_SIZE
20#define PICO_FLASH_BANK_TOTAL_SIZE (FLASH_SECTOR_SIZE * 2u)
21#endif
22
23// PICO_CONFIG: PICO_FLASH_BANK_STORAGE_OFFSET, Offset in flash of the Bluetooth flash storage, type=int, default=PICO_FLASH_SIZE_BYTES - PICO_FLASH_BANK_TOTAL_SIZE, group=pico_btstack
24#ifndef PICO_FLASH_BANK_STORAGE_OFFSET
25#define PICO_FLASH_BANK_STORAGE_OFFSET (PICO_FLASH_SIZE_BYTES - PICO_FLASH_BANK_TOTAL_SIZE)
26#endif
27
34const hal_flash_bank_t *pico_flash_bank_instance(void);
35
36#ifdef __cplusplus
37}
38#endif
39#endif
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.
Definition: btstack_flash_bank.c:176
flash.h
pico.h