Fork ESP-IDF's bluetooth component

i want better sbc encoding, and no cla will stop me
This commit is contained in:
jacqueline
2024-03-28 14:32:49 +11:00
parent 239e6d8950
commit ee29c25b29
1761 changed files with 737738 additions and 0 deletions
@@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _CONSOLE_H
#define _CONSOLE_H
#include <stdio.h>
#define console_printf printf
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_NIMBLE_MEM_H__
#define __ESP_NIMBLE_MEM_H__
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
// #pragma message "This file should be replaced with bt_osi_mem.h, used here for compatibility"
#include "bt_osi_mem.h"
#define nimble_platform_mem_malloc bt_osi_mem_malloc
#define nimble_platform_mem_calloc bt_osi_mem_calloc
#define nimble_platform_mem_free bt_osi_mem_free
#ifdef __cplusplus
}
#endif
#endif /* __ESP_NIMBLE_MEM_H__ */
+40
View File
@@ -0,0 +1,40 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _NVS_H
#define _NVS_H
#include <stdio.h>
#include "nvs.h"
#include "nimble/storage_port.h"
static int
nvs_open_custom(const char* namespace_name, open_mode_t open_mode, cache_handle_t *out_handle)
{
switch (open_mode) {
case READONLY:
return nvs_open(namespace_name, NVS_READONLY, out_handle);
case READWRITE:
return nvs_open(namespace_name, NVS_READWRITE, out_handle);
default:
return -1;
}
}
struct cache_fn_mapping
link_storage_fn(void *storage_cb)
{
struct cache_fn_mapping cache_fn;
cache_fn.open = nvs_open_custom;
cache_fn.close = nvs_close;
cache_fn.erase_all = nvs_erase_all;
cache_fn.write = nvs_set_blob;
cache_fn.read = nvs_get_blob;
return cache_fn;
}
#endif