mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo. (Line endings, blank lines at end of file, trailing whitespace)
This commit is contained in:
parent
e82eac4354
commit
66fb5a29bb
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -12,5 +12,3 @@ contact_links:
|
||||
- name: Hardware-related services
|
||||
url: https://www.espressif.com/en/products/hardware-services
|
||||
about: Espressif service providing hardware design and certification support
|
||||
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -87,4 +87,4 @@ flake8_output.txt
|
||||
build
|
||||
|
||||
# lock files for examples and components
|
||||
dependencies.lock
|
||||
dependencies.lock
|
||||
|
@ -16,6 +16,6 @@ python:
|
||||
- requirements: docs/requirements.txt
|
||||
|
||||
# We need to list all the submodules included in documenation build by DOxygen
|
||||
submodules:
|
||||
submodules:
|
||||
include:
|
||||
- components/mqtt/esp-mqtt
|
||||
- components/mqtt/esp-mqtt
|
||||
|
@ -16,5 +16,3 @@ else
|
||||
export PATH="${IDF_ADD_PATHS_EXTRAS}:${PATH}"
|
||||
echo "Added to PATH: ${IDF_ADD_PATHS_EXTRAS}"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
set(srcs
|
||||
set(srcs
|
||||
"app_trace.c"
|
||||
"app_trace_util.c"
|
||||
"host_file_io.c"
|
||||
@ -12,7 +12,7 @@ if(CONFIG_SYSVIEW_ENABLE)
|
||||
sys_view/SEGGER
|
||||
sys_view/Sample/OS)
|
||||
|
||||
list(APPEND srcs
|
||||
list(APPEND srcs
|
||||
"sys_view/SEGGER/SEGGER_SYSVIEW.c"
|
||||
"sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c"
|
||||
"sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c"
|
||||
|
@ -111,4 +111,3 @@ static IRAM_ATTR void record_free(void *p, void **callers)
|
||||
#include "heap_trace.inc"
|
||||
|
||||
#endif /*CONFIG_HEAP_TRACING_TOHOST*/
|
||||
|
||||
|
@ -146,7 +146,7 @@ void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char
|
||||
|
||||
ESP_EARLY_LOGV(TAG, "esp_apptrace_fopen '%s' '%s'", path, mode);
|
||||
if (path == NULL || mode == NULL) {
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmd_args.path = path;
|
||||
@ -217,7 +217,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
|
||||
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size*nmemb);
|
||||
|
||||
if (ptr == NULL) {
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmd_args.buf = (void *)ptr;
|
||||
@ -256,7 +256,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
|
||||
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size*nmemb);
|
||||
|
||||
if (ptr == NULL) {
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmd_args.size = size * nmemb;
|
||||
|
@ -24,7 +24,7 @@ extern "C" {
|
||||
/** Infinite waiting timeout */
|
||||
#define ESP_APPTRACE_TMO_INFINITE ((uint32_t)-1)
|
||||
|
||||
/** Structure which holds data necessary for measuring time intervals.
|
||||
/** Structure which holds data necessary for measuring time intervals.
|
||||
*
|
||||
* After initialization via esp_apptrace_tmo_init() user needs to call esp_apptrace_tmo_check()
|
||||
* periodically to check timeout for expiration.
|
||||
@ -100,7 +100,7 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock);
|
||||
|
||||
/** Ring buffer control structure.
|
||||
*
|
||||
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
|
||||
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
|
||||
* current ring buffer size can be temporarily shrinked in order to provide buffer with requested size.
|
||||
*/
|
||||
typedef struct {
|
||||
|
@ -1,6 +1,6 @@
|
||||
[mapping:app_trace]
|
||||
archive: libapp_trace.a
|
||||
entries:
|
||||
entries:
|
||||
app_trace (noflash)
|
||||
app_trace_util (noflash)
|
||||
SEGGER_SYSVIEW (noflash)
|
||||
|
@ -9,4 +9,4 @@ CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE
|
||||
CONFIG_ESP32_APPTRACE_ONPANIC_HOST_FLUSH_TMO CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO
|
||||
CONFIG_ESP32_APPTRACE_POSTMORTEM_FLUSH_TRAX_THRESH CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH
|
||||
CONFIG_ESP32_APPTRACE_PENDING_DATA_SIZE_MAX CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX
|
||||
CONFIG_ESP32_GCOV_ENABLE CONFIG_APPTRACE_GCOV_ENABLE
|
||||
CONFIG_ESP32_GCOV_ENABLE CONFIG_APPTRACE_GCOV_ENABLE
|
||||
|
@ -88,7 +88,7 @@ Purpose : Global types
|
||||
#else
|
||||
#define U64_C(x) x##ULL
|
||||
#endif
|
||||
#else
|
||||
#else
|
||||
//
|
||||
// C99 compliant compiler
|
||||
//
|
||||
|
@ -58,7 +58,7 @@
|
||||
---------------------------END-OF-HEADER------------------------------
|
||||
File : SEGGER_RTT.h
|
||||
Purpose : Implementation of SEGGER real-time transfer which allows
|
||||
real-time communication on targets which support debugger
|
||||
real-time communication on targets which support debugger
|
||||
memory accesses while the CPU is running.
|
||||
Revision: $Rev: 5626 $
|
||||
----------------------------------------------------------------------
|
||||
|
@ -402,7 +402,7 @@ static U8 *_EncodeStr(U8 *pPayload, const char *pText, unsigned int Limit) {
|
||||
// Write Len
|
||||
//
|
||||
if (Len < 255) {
|
||||
*pPayload++ = Len;
|
||||
*pPayload++ = Len;
|
||||
} else {
|
||||
*pPayload++ = 255;
|
||||
*pPayload++ = (Len & 255);
|
||||
@ -556,7 +556,7 @@ static int _TrySendOverflowPacket(void) {
|
||||
* _SendSyncInfo()
|
||||
*
|
||||
* Function description
|
||||
* Send SystemView sync packet and system information in
|
||||
* Send SystemView sync packet and system information in
|
||||
* post mortem mode.
|
||||
*
|
||||
* Additional information
|
||||
@ -792,7 +792,7 @@ static void _VPrintHost(const char* s, U32 Options, va_list* pParamList) {
|
||||
U32 aParas[SEGGER_SYSVIEW_MAX_ARGUMENTS];
|
||||
U32 NumArguments;
|
||||
const char* p;
|
||||
|
||||
|
||||
p = s;
|
||||
NumArguments = 0;
|
||||
while (*p) {
|
||||
|
@ -118,7 +118,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// Lowest Id reported by the Application.
|
||||
#ifndef SEGGER_SYSVIEW_ID_BASE
|
||||
#ifndef SEGGER_SYSVIEW_ID_BASE
|
||||
#define SEGGER_SYSVIEW_ID_BASE 0
|
||||
#endif
|
||||
|
||||
|
@ -136,11 +136,11 @@ static U64 _cbGetTime(void) {
|
||||
*/
|
||||
void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
|
||||
unsigned n;
|
||||
|
||||
|
||||
if (memcmp(pcTaskName, "IDLE", 5) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (n = 0; n < SYSVIEW_FREERTOS_MAX_NOF_TASKS; n++) {
|
||||
if (_aTasks[n].xHandle == 0) {
|
||||
break;
|
||||
@ -170,7 +170,7 @@ void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPrio
|
||||
*/
|
||||
void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
|
||||
unsigned n;
|
||||
|
||||
|
||||
if (memcmp(pcTaskName, "IDLE", 5) == 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
idf_component_register(SRCS "esp_ota_ops.c"
|
||||
idf_component_register(SRCS "esp_ota_ops.c"
|
||||
"esp_app_desc.c"
|
||||
INCLUDE_DIRS "include"
|
||||
REQUIRES spi_flash partition_table bootloader_support)
|
||||
@ -52,7 +52,7 @@ if(NOT BOOTLOADER_BUILD)
|
||||
|
||||
add_custom_target(read_otadata DEPENDS "${PARTITION_CSV_PATH}"
|
||||
COMMAND ${otatool_py} ${esptool_args}
|
||||
--partition-table-file ${PARTITION_CSV_PATH}
|
||||
--partition-table-file ${PARTITION_CSV_PATH}
|
||||
--partition-table-offset ${PARTITION_TABLE_OFFSET}
|
||||
read_otadata)
|
||||
|
||||
|
@ -24,7 +24,7 @@ $(BLANK_OTA_DATA_FILE): partition_table_get_info $(PARTITION_TABLE_CSV_PATH) | c
|
||||
|
||||
blank_ota_data: $(BLANK_OTA_DATA_FILE)
|
||||
|
||||
# If there is no otadata partition, both OTA_DATA_OFFSET and BLANK_OTA_DATA_FILE
|
||||
# If there is no otadata partition, both OTA_DATA_OFFSET and BLANK_OTA_DATA_FILE
|
||||
# expand to empty values.
|
||||
ESPTOOL_ALL_FLASH_ARGS += $(OTA_DATA_OFFSET) $(BLANK_OTA_DATA_FILE)
|
||||
|
||||
@ -36,8 +36,8 @@ erase_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_pyth
|
||||
erase_otadata
|
||||
|
||||
read_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
|
||||
$(OTATOOL_PY) $(ESPTOOL_ARGS) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
|
||||
--partition-table-offset $(partition_table_offset) \
|
||||
$(OTATOOL_PY) $(ESPTOOL_ARGS) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
|
||||
--partition-table-offset $(partition_table_offset) \
|
||||
read_otadata
|
||||
|
||||
all: blank_ota_data
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
|
||||
|
||||
# esp_app_desc structure is added as an undefined symbol because otherwise the
|
||||
# esp_app_desc structure is added as an undefined symbol because otherwise the
|
||||
# linker will ignore this structure as it has no other files depending on it.
|
||||
COMPONENT_ADD_LDFLAGS += -u esp_app_desc
|
||||
|
||||
|
@ -80,7 +80,7 @@ __attribute__((constructor)) void esp_ota_init_app_elf_sha256(void)
|
||||
/* The esp_app_desc.app_elf_sha256 should be possible to print in panic handler during cache is disabled.
|
||||
* But because the cache is disabled the reading esp_app_desc.app_elf_sha256 is not right and
|
||||
* can lead to a complete lock-up of the CPU.
|
||||
* For this reason we do a reading of esp_app_desc.app_elf_sha256 while start up in esp_ota_init_app_elf_sha256()
|
||||
* For this reason we do a reading of esp_app_desc.app_elf_sha256 while start up in esp_ota_init_app_elf_sha256()
|
||||
* and keep it in the static s_app_elf_sha256 value.
|
||||
*/
|
||||
int IRAM_ATTR esp_ota_get_app_elf_sha256(char* dst, size_t size)
|
||||
|
@ -50,7 +50,7 @@ typedef uint32_t esp_ota_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Return esp_app_desc structure. This structure includes app version.
|
||||
*
|
||||
*
|
||||
* Return description for running app.
|
||||
* @return Pointer to esp_app_desc structure.
|
||||
*/
|
||||
@ -225,7 +225,7 @@ const esp_partition_t* esp_ota_get_next_update_partition(const esp_partition_t *
|
||||
|
||||
/**
|
||||
* @brief Returns esp_app_desc structure for app partition. This structure includes app version.
|
||||
*
|
||||
*
|
||||
* Returns a description for the requested app partition.
|
||||
* @param[in] partition Pointer to app partition. (only app partition)
|
||||
* @param[out] app_desc Structure of info about app.
|
||||
|
@ -30,7 +30,7 @@ namespace detail {
|
||||
template <typename Exception>
|
||||
void throw_exception(const Exception& e)
|
||||
{
|
||||
ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
|
||||
ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
|
||||
abort();
|
||||
}
|
||||
}}
|
||||
|
@ -23,4 +23,3 @@ if(NOT CONFIG_SECURE_BOOT)
|
||||
${CONFIG_BOOTLOADER_OFFSET_IN_FLASH}
|
||||
"${BOOTLOADER_BUILD_DIR}/bootloader.bin")
|
||||
endif()
|
||||
|
||||
|
@ -788,4 +788,3 @@ menu "Security features"
|
||||
|
||||
|
||||
endmenu # Security features
|
||||
|
||||
|
@ -157,4 +157,4 @@ ifdef CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
|
||||
ifdef CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES
|
||||
rm -f $(BOOTLOADER_SIGNED_BIN)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -4,4 +4,3 @@
|
||||
#
|
||||
# See Makefile.projbuild for the targets which actually build the bootloader.
|
||||
COMPONENT_CONFIG_ONLY := 1
|
||||
|
||||
|
@ -34,7 +34,7 @@ int uECC_verify_antifault(const uint8_t *public_key,
|
||||
uECC_word_t *_public = (uECC_word_t *)public_key;
|
||||
#else
|
||||
uECC_word_t _public[uECC_MAX_WORDS * 2];
|
||||
#endif
|
||||
#endif
|
||||
uECC_word_t r[uECC_MAX_WORDS], s[uECC_MAX_WORDS];
|
||||
wordcount_t num_words = curve->num_words;
|
||||
wordcount_t num_n_words = BITS_TO_WORDS(curve->num_n_bits);
|
||||
|
@ -6,4 +6,3 @@ set(scripts "ld/${target}/bootloader.ld"
|
||||
"ld/${target}/bootloader.rom.ld")
|
||||
|
||||
target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}")
|
||||
|
||||
|
@ -18,7 +18,7 @@ ifdef CONFIG_IDF_TARGET_ESP32
|
||||
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
|
||||
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.spiflash.ld
|
||||
endif
|
||||
ifdef CONFIG_ESP32_REV_MIN_3
|
||||
ifdef CONFIG_ESP32_REV_MIN_3
|
||||
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.eco3.ld
|
||||
endif
|
||||
endif
|
||||
|
@ -31,4 +31,3 @@ int bootloader_clock_get_rated_freq_mhz(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -27,4 +27,3 @@
|
||||
*/
|
||||
esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode);
|
||||
#endif
|
||||
|
||||
|
@ -21,4 +21,4 @@ void bootloader_init_mem(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -67,7 +67,7 @@ static inline bool esp_secure_boot_enabled(void)
|
||||
* @important This function is intended to be called from bootloader code only.
|
||||
*
|
||||
* This function is only used in the context of the Secure Boot V1 scheme.
|
||||
*
|
||||
*
|
||||
* If secure boot is not yet enabled for bootloader, this will:
|
||||
* 1) generate the secure boot key and burn it on EFUSE
|
||||
* (without enabling R/W protection)
|
||||
@ -91,9 +91,9 @@ esp_err_t esp_secure_boot_generate_digest(void);
|
||||
*
|
||||
* @important This function is intended to be called from bootloader code only.
|
||||
*
|
||||
* @important In case of Secure Boot V1, this will enable r/w protection
|
||||
* of secure boot key on EFUSE, therefore it is to be ensured that
|
||||
* esp_secure_boot_generate_digest() is called before this .If secure boot is not
|
||||
* @important In case of Secure Boot V1, this will enable r/w protection
|
||||
* of secure boot key on EFUSE, therefore it is to be ensured that
|
||||
* esp_secure_boot_generate_digest() is called before this .If secure boot is not
|
||||
* yet enabled for bootloader, this will
|
||||
* 1) enable R/W protection of secure boot key on EFUSE
|
||||
* 2) enable secure boot by blowing the EFUSE_RD_ABS_DONE_0 efuse.
|
||||
@ -116,9 +116,9 @@ esp_err_t esp_secure_boot_permanently_enable(void);
|
||||
* enabled on the chip via efuse.
|
||||
*
|
||||
* @important This function is intended to be called from bootloader code only.
|
||||
*
|
||||
* @important In case of Secure Boot V2, this will enable write protection
|
||||
* of secure boot key on EFUSE in BLK2. .If secure boot is not
|
||||
*
|
||||
* @important In case of Secure Boot V2, this will enable write protection
|
||||
* of secure boot key on EFUSE in BLK2. .If secure boot is not
|
||||
* yet enabled for bootloader, this will
|
||||
* 1) enable W protection of secure boot key on EFUSE
|
||||
* 2) enable secure boot by blowing the EFUSE_RD_ABS_DONE_1 efuse.
|
||||
@ -127,7 +127,7 @@ esp_err_t esp_secure_boot_permanently_enable(void);
|
||||
* ROM bootloader does this.)
|
||||
*
|
||||
* @param image_data Image metadata of the application to be loaded.
|
||||
*
|
||||
*
|
||||
* Will fail if efuses have been part-burned in a way that indicates
|
||||
* secure boot should not or could not be correctly enabled.
|
||||
*
|
||||
@ -141,7 +141,7 @@ esp_err_t esp_secure_boot_v2_permanently_enable(const esp_image_metadata_t *imag
|
||||
*
|
||||
* For ECDSA Scheme (Secure Boot V1) - deterministic ECDSA w/ SHA256 image
|
||||
* For RSA Scheme (Secure Boot V2) - RSA-PSS Verification of the SHA-256 image
|
||||
*
|
||||
*
|
||||
* Public key is compiled into the calling program in the ECDSA Scheme.
|
||||
* See the apt docs/security/secure-boot-v1.rst or docs/security/secure-boot-v2.rst for details.
|
||||
*
|
||||
|
@ -117,13 +117,13 @@ void bootloader_debug_buffer(const void *buffer, size_t length, const char *labe
|
||||
/** @brief Generates the digest of the data between offset & offset+length.
|
||||
*
|
||||
* This function should be used when the size of the data is larger than 3.2MB.
|
||||
* The MMU capacity is 3.2MB (50 pages - 64KB each). This function generates the SHA-256
|
||||
* of the data in chunks of 3.2MB, considering the MMU capacity.
|
||||
*
|
||||
* The MMU capacity is 3.2MB (50 pages - 64KB each). This function generates the SHA-256
|
||||
* of the data in chunks of 3.2MB, considering the MMU capacity.
|
||||
*
|
||||
* @param[in] flash_offset Offset of the data in flash.
|
||||
* @param[in] len Length of data in bytes.
|
||||
* @param[out] digest Pointer to buffer where the digest is written, if ESP_OK is returned.
|
||||
*
|
||||
* @param[out] digest Pointer to buffer where the digest is written, if ESP_OK is returned.
|
||||
*
|
||||
* @return ESP_OK if secure boot digest is generated successfully.
|
||||
*/
|
||||
esp_err_t bootloader_sha256_flash_contents(uint32_t flash_offset, uint32_t len, uint8_t *digest);
|
||||
|
@ -78,5 +78,3 @@ __attribute__((weak)) void bootloader_clock_configure(void)
|
||||
}
|
||||
#endif // CONFIG_ESP_SYSTEM_RTC_EXT_XTAL
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,4 +25,4 @@ uint32_t bootloader_common_get_chip_ver_pkg(void)
|
||||
{
|
||||
// should return the same value as esp_efuse_get_pkg_ver()
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -499,4 +499,4 @@ esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode)
|
||||
SPIFLASH.user.val = reg_bkp_usr;
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif //SOC_CACHE_SUPPORT_WRAP
|
||||
#endif //SOC_CACHE_SUPPORT_WRAP
|
||||
|
@ -45,4 +45,4 @@ void bootloader_init_mem(void)
|
||||
|
||||
// protect memory region
|
||||
cpu_configure_region_protection();
|
||||
}
|
||||
}
|
||||
|
@ -300,8 +300,8 @@ static esp_err_t encrypt_bootloader(void)
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to encrypt bootloader in place: 0x%x", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "bootloader encrypted successfully");
|
||||
return err;
|
||||
}
|
||||
|
@ -876,4 +876,4 @@ int esp_image_get_flash_size(esp_image_flash_size_t app_flash_size)
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,12 +84,12 @@ void esp_flash_write_protect_crypt_cnt(void)
|
||||
esp_flash_enc_mode_t esp_get_flash_encryption_mode(void)
|
||||
{
|
||||
bool flash_crypt_cnt_wr_dis = false;
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
uint8_t dis_dl_enc = 0, dis_dl_dec = 0, dis_dl_cache = 0;
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
uint8_t dis_dl_enc = 0;
|
||||
uint8_t dis_dl_icache = 0;
|
||||
uint8_t dis_dl_dcache = 0;
|
||||
uint8_t dis_dl_enc = 0;
|
||||
uint8_t dis_dl_icache = 0;
|
||||
uint8_t dis_dl_dcache = 0;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -82,4 +82,3 @@ esp_err_t esp_partition_table_verify(const esp_partition_info_t *partition_table
|
||||
}
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signa
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = mbedtls_rsa_rsassa_pss_verify( &pk, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA256, DIGEST_LEN,
|
||||
ret = mbedtls_rsa_rsassa_pss_verify( &pk, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA256, DIGEST_LEN,
|
||||
sig_block->block[i].image_digest, sig_be);
|
||||
if (ret != 0) {
|
||||
ESP_LOGE(TAG, "Failed mbedtls_rsa_rsassa_pss_verify, err: %d", ret);
|
||||
|
@ -50,5 +50,3 @@ void *btc_profile_cb_get(btc_pid_t profile_id)
|
||||
|
||||
return btc_profile_cb_tab[profile_id];
|
||||
}
|
||||
|
||||
|
||||
|
@ -441,4 +441,3 @@ int get_btc_work_queue_size(void)
|
||||
{
|
||||
return osi_thread_queue_wait_size(btc_thread, 0);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ bool fixed_queue_enqueue(fixed_queue_t *queue, void *data, uint32_t timeout)
|
||||
}
|
||||
|
||||
osi_mutex_lock(&queue->lock, OSI_MUTEX_MAX_TIMEOUT);
|
||||
status = list_append(queue->list, data); //Check whether enqueued success
|
||||
status = list_append(queue->list, data); //Check whether enqueued success
|
||||
osi_mutex_unlock(&queue->lock);
|
||||
|
||||
if(status == true )
|
||||
@ -254,4 +254,3 @@ void fixed_queue_process(fixed_queue_t *queue)
|
||||
queue->dequeue_ready(queue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,4 +61,3 @@ void hash_function_blob(const unsigned char *s, unsigned int len, hash_key_t h)
|
||||
h[0] = (h[0] << 7) + h[0] + *s++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ bool hash_map_erase(hash_map_t *hash_map, const void *key)
|
||||
list_free(hash_map->bucket[hash_key].list);
|
||||
hash_map->bucket[hash_key].list = NULL;
|
||||
}
|
||||
|
||||
|
||||
return remove;
|
||||
}
|
||||
|
||||
|
@ -50,4 +50,3 @@ void osi_mutex_global_lock(void);
|
||||
void osi_mutex_global_unlock(void);
|
||||
|
||||
#endif /* __MUTEX_H__ */
|
||||
|
||||
|
@ -309,4 +309,4 @@ list_node_t *list_delete_node(list_t *list, list_node_t *node)
|
||||
--list->length;
|
||||
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static void osi_thread_stop(osi_thread_t *thread)
|
||||
|
||||
//join
|
||||
ret = osi_thread_join(thread, 1000); //wait 1000ms
|
||||
|
||||
|
||||
//if join failed, delete the task here
|
||||
if (ret != 0 && thread->thread_handle) {
|
||||
vTaskDelete(thread->thread_handle);
|
||||
@ -160,7 +160,7 @@ osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priorit
|
||||
|
||||
osi_sem_take(&start_arg.start_sem, OSI_SEM_MAX_TIMEOUT);
|
||||
osi_sem_free(&start_arg.start_sem);
|
||||
|
||||
|
||||
return thread;
|
||||
|
||||
_err:
|
||||
|
@ -1228,7 +1228,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
|
||||
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
|
||||
if (osi_funcs_p == NULL) {
|
||||
return ESP_ERR_NO_MEM;
|
||||
|
@ -1123,4 +1123,3 @@ if BLE_MESH
|
||||
endmenu
|
||||
|
||||
endif # BLE_MESH
|
||||
|
||||
|
@ -536,4 +536,3 @@ const uint8_t *esp_ble_mesh_get_fast_prov_app_key(uint16_t net_idx, uint16_t app
|
||||
return bt_mesh_get_fast_prov_app_key(net_idx, app_idx);
|
||||
}
|
||||
#endif /* CONFIG_BLE_MESH_FAST_PROV */
|
||||
|
||||
|
@ -530,4 +530,3 @@ esp_err_t esp_ble_mesh_set_fast_prov_action(esp_ble_mesh_fast_prov_action_t acti
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BLE_MESH_FAST_PROV */
|
||||
|
||||
|
@ -40,7 +40,7 @@ esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp
|
||||
|
||||
/**
|
||||
* @brief De-initialize BLE Mesh module.
|
||||
*
|
||||
*
|
||||
* @note This function shall be invoked after esp_ble_mesh_client_model_deinit().
|
||||
*
|
||||
* @param[in] param: Pointer to the structure of BLE Mesh deinit parameters.
|
||||
|
@ -124,4 +124,3 @@ esp_err_t esp_ble_mesh_proxy_client_remove_filter_addr(uint8_t conn_handle, uint
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_PROXY_API_H_ */
|
||||
|
||||
|
@ -823,4 +823,3 @@ esp_err_t esp_ble_mesh_config_client_set_state(esp_ble_mesh_client_common_param_
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_CONFIG_MODEL_API_H_ */
|
||||
|
||||
|
@ -1302,4 +1302,3 @@ esp_err_t esp_ble_mesh_register_generic_server_callback(esp_ble_mesh_generic_ser
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_GENERIC_MODEL_API_H_ */
|
||||
|
||||
|
@ -1680,4 +1680,3 @@ esp_err_t esp_ble_mesh_register_lighting_server_callback(esp_ble_mesh_lighting_s
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_LIGHTING_MODEL_API_H_ */
|
||||
|
||||
|
@ -715,5 +715,3 @@ esp_err_t esp_ble_mesh_register_sensor_server_callback(esp_ble_mesh_sensor_serve
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_SENSOR_MODEL_API_H_ */
|
||||
|
||||
|
||||
|
@ -917,4 +917,3 @@ esp_err_t esp_ble_mesh_register_time_scene_server_callback(esp_ble_mesh_time_sce
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_BLE_MESH_TIME_SCENE_MODEL_API_H_ */
|
||||
|
||||
|
@ -81,4 +81,3 @@ void btc_ble_mesh_lighting_server_cb_handler(btc_msg_t *msg);
|
||||
#endif
|
||||
|
||||
#endif /* _BTC_BLE_MESH_LIGHTING_MODEL_H_ */
|
||||
|
||||
|
@ -80,4 +80,3 @@ void btc_ble_mesh_sensor_server_cb_handler(btc_msg_t *msg);
|
||||
#endif
|
||||
|
||||
#endif /* _BTC_BLE_MESH_SENSOR_MODEL_H_ */
|
||||
|
||||
|
@ -81,4 +81,3 @@ void btc_ble_mesh_time_scene_server_cb_handler(btc_msg_t *msg);
|
||||
#endif
|
||||
|
||||
#endif /* _BTC_BLE_MESH_TIME_SCENE_MODEL_H_ */
|
||||
|
||||
|
@ -1755,4 +1755,3 @@ static inline size_t net_buf_frags_len(struct net_buf *buf)
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_BUF_H_ */
|
||||
|
||||
|
@ -77,4 +77,4 @@ u8_t bt_mesh_get_device_role(struct bt_mesh_model *model, bool srv_send);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_COMMON_H_ */
|
||||
#endif /* _BLE_MESH_COMMON_H_ */
|
||||
|
@ -49,4 +49,4 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_CONFIG_H_ */
|
||||
#endif /* _BLE_MESH_CONFIG_H_ */
|
||||
|
@ -57,4 +57,3 @@ void k_sleep(s32_t duration);
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_KERNEL_H_ */
|
||||
|
||||
|
@ -55,4 +55,3 @@ void bt_mesh_mutex_deinit(void);
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_MUTEX_H_ */
|
||||
|
||||
|
@ -465,4 +465,3 @@ static inline bool sys_slist_find_and_remove(sys_slist_t *list,
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_SLIST_H_ */
|
||||
|
||||
|
@ -264,4 +264,3 @@ void bt_mesh_timer_deinit(void);
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_TIMER_H_ */
|
||||
|
||||
|
@ -757,4 +757,4 @@ size_t net_buf_append_bytes(struct net_buf *buf, size_t len,
|
||||
|
||||
/* Unreachable */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -813,4 +813,3 @@ int bt_mesh_update_exceptional_list(u8_t sub_code, u8_t type, void *info);
|
||||
#endif
|
||||
|
||||
#endif /* _BLE_MESH_BEARER_ADAPT_H_ */
|
||||
|
||||
|
@ -147,7 +147,7 @@ int bt_mesh_provisioner_prov_init(const struct bt_mesh_prov *prov_info);
|
||||
* related information.
|
||||
*
|
||||
* @param[in] erase: Indicate if erasing provisioning information from flash.
|
||||
*
|
||||
*
|
||||
* @return Zero - success, otherwise - fail
|
||||
*/
|
||||
int bt_mesh_provisioner_prov_deinit(bool erase);
|
||||
|
@ -128,4 +128,3 @@ int bt_mesh_set_client_model_role(struct bt_mesh_model *model, u8_t role);
|
||||
#endif
|
||||
|
||||
#endif /* _CLIENT_COMMON_H_ */
|
||||
|
||||
|
@ -1355,4 +1355,4 @@ u8_t bt_mesh_get_dev_prop_len(u16_t prop_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DEVICE_PROPERTY_H_ */
|
||||
#endif /* _DEVICE_PROPERTY_H_ */
|
||||
|
@ -133,7 +133,7 @@ esp_err_t esp_bluedroid_init(void)
|
||||
osi_mem_dbg_init();
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
* BTC Init
|
||||
*/
|
||||
ret = btc_init();
|
||||
@ -211,4 +211,3 @@ esp_err_t esp_bluedroid_deinit(void)
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern UINT16 L2CA_GetFreePktBufferNum_LE(void);
|
||||
* sendable packets number on controller
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
uint16_t esp_ble_get_sendable_packets_num (void)
|
||||
{
|
||||
return L2CA_GetFreePktBufferNum_LE();
|
||||
@ -69,15 +69,15 @@ uint16_t esp_ble_get_sendable_packets_num (void)
|
||||
* @brief This function is used to query the number of available buffers for the current connection.
|
||||
* When you need to query the current available buffer number, it is recommended to use this API.
|
||||
* @param[in] conn_id: current connection id.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* Number of available buffers for the current connection
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
extern UINT16 L2CA_GetCurFreePktBufferNum_LE(UINT16 conn_id);
|
||||
uint16_t esp_ble_get_cur_sendable_packets_num (uint16_t connid)
|
||||
{
|
||||
return L2CA_GetCurFreePktBufferNum_LE(connid);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -178,7 +178,7 @@ esp_gatt_status_t esp_ble_gattc_get_all_char(esp_gatt_if_t gattc_if,
|
||||
|
||||
esp_gatt_status_t esp_ble_gattc_get_all_descr(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t char_handle,
|
||||
uint16_t char_handle,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count, uint16_t offset)
|
||||
{
|
||||
@ -196,7 +196,7 @@ esp_gatt_status_t esp_ble_gattc_get_all_descr(esp_gatt_if_t gattc_if,
|
||||
return btc_ble_gattc_get_all_descr(conn_hdl, char_handle, result, count, offset);
|
||||
}
|
||||
|
||||
esp_gatt_status_t esp_ble_gattc_get_char_by_uuid(esp_gatt_if_t gattc_if,
|
||||
esp_gatt_status_t esp_ble_gattc_get_char_by_uuid(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
@ -252,7 +252,7 @@ esp_gatt_status_t esp_ble_gattc_get_descr_by_char_handle(esp_gatt_if_t gattc_if,
|
||||
*count = 0;
|
||||
return ESP_GATT_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
|
||||
if (result == NULL || count == NULL || *count == 0) {
|
||||
return ESP_GATT_INVALID_PDU;
|
||||
}
|
||||
@ -326,7 +326,7 @@ esp_gatt_status_t esp_ble_gattc_get_db(esp_gatt_if_t gattc_if, uint16_t conn_id,
|
||||
}
|
||||
|
||||
|
||||
esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
|
||||
esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id, uint16_t handle,
|
||||
esp_gatt_auth_req_t auth_req)
|
||||
{
|
||||
@ -469,7 +469,7 @@ esp_err_t esp_ble_gattc_write_char_descr (esp_gatt_if_t gattc_if,
|
||||
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), btc_gattc_arg_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
}
|
||||
|
||||
esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
|
||||
esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id, uint16_t handle,
|
||||
uint16_t offset,
|
||||
uint16_t value_len,
|
||||
@ -643,4 +643,3 @@ esp_err_t esp_ble_gattc_cache_get_addr_list(esp_gatt_if_t gattc_if)
|
||||
}
|
||||
|
||||
#endif ///GATTC_INCLUDED == TRUE
|
||||
|
||||
|
@ -42,7 +42,7 @@ esp_err_t esp_ble_gatts_app_register(uint16_t app_id)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
//if (app_id < ESP_APP_ID_MIN || app_id > ESP_APP_ID_MAX) {
|
||||
if (app_id > ESP_APP_ID_MAX) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
@ -63,7 +63,7 @@ esp_err_t esp_ble_gatts_app_unregister(esp_gatt_if_t gatts_if)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_APP_UNREGISTER;
|
||||
@ -79,7 +79,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if,
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_CREATE_SERVICE;
|
||||
@ -119,7 +119,7 @@ esp_err_t esp_ble_gatts_add_included_service(uint16_t service_handle, uint16_t i
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_ADD_INCLUDE_SERVICE;
|
||||
@ -184,7 +184,7 @@ esp_err_t esp_ble_gatts_add_char_descr (uint16_t service_handle,
|
||||
if (status != ESP_OK){
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
memset(&arg, 0, sizeof(btc_ble_gatts_args_t));
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
@ -212,7 +212,7 @@ esp_err_t esp_ble_gatts_delete_service(uint16_t service_handle)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_DELETE_SERVICE;
|
||||
@ -227,7 +227,7 @@ esp_err_t esp_ble_gatts_start_service(uint16_t service_handle)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_START_SERVICE;
|
||||
@ -242,7 +242,7 @@ esp_err_t esp_ble_gatts_stop_service(uint16_t service_handle)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_STOP_SERVICE;
|
||||
@ -259,12 +259,12 @@ esp_err_t esp_ble_gatts_send_indicate(esp_gatt_if_t gatts_if, uint16_t conn_id,
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, conn_id)) {
|
||||
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_SEND_INDICATE;
|
||||
@ -287,7 +287,7 @@ esp_err_t esp_ble_gatts_send_response(esp_gatt_if_t gatts_if, uint16_t conn_id,
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_SEND_RESPONSE;
|
||||
@ -336,7 +336,7 @@ esp_err_t esp_ble_gatts_open(esp_gatt_if_t gatts_if, esp_bd_addr_t remote_bda, b
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_OPEN;
|
||||
@ -354,7 +354,7 @@ esp_err_t esp_ble_gatts_close(esp_gatt_if_t gatts_if, uint16_t conn_id)
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_CLOSE;
|
||||
@ -370,17 +370,17 @@ esp_err_t esp_ble_gatts_send_service_change_indication(esp_gatt_if_t gatts_if, e
|
||||
btc_ble_gatts_args_t arg;
|
||||
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_GATTS;
|
||||
msg.act = BTC_GATTS_ACT_SEND_SERVICE_CHANGE;
|
||||
arg.send_service_change.gatts_if = gatts_if;
|
||||
if(remote_bda) {
|
||||
memcpy(&arg.send_service_change.remote_bda, remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(&arg.send_service_change.remote_bda, remote_bda, sizeof(esp_bd_addr_t));
|
||||
} else {
|
||||
memset(arg.send_service_change.remote_bda, 0, sizeof(esp_bd_addr_t));
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gatts_args_t), NULL)
|
||||
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
|
@ -57,11 +57,11 @@ esp_err_t esp_bt_hf_init(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_INIT_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.init), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -76,11 +76,11 @@ esp_err_t esp_bt_hf_deinit(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_DEINIT_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.deinit), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -95,11 +95,11 @@ esp_err_t esp_bt_hf_connect(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_CONNECT_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.connect), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -114,11 +114,11 @@ esp_err_t esp_bt_hf_disconnect(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_DISCONNECT_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.disconnect), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -133,7 +133,7 @@ esp_err_t esp_bt_hf_connect_audio(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_CONNECT_AUDIO_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.connect_audio), remote_addr, sizeof(esp_bd_addr_t));
|
||||
@ -152,11 +152,11 @@ esp_err_t esp_bt_hf_disconnect_audio(esp_bd_addr_t remote_addr)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_DISCONNECT_AUDIO_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.disconnect_audio), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -171,12 +171,12 @@ esp_err_t esp_bt_hf_vra(esp_bd_addr_t remote_addr, esp_hf_vr_state_t value)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_VRA_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
arg.vra_rep.value = value;
|
||||
memcpy(&(arg.volcon.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -191,13 +191,13 @@ esp_err_t esp_bt_hf_volume_control(esp_bd_addr_t remote_addr, esp_hf_volume_cont
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_VOLUME_CONTROL_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
arg.volcon.target_type = type;
|
||||
arg.volcon.volume = volume;
|
||||
memcpy(&(arg.volcon.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -212,12 +212,12 @@ esp_err_t esp_hf_unat_response(esp_bd_addr_t remote_addr, char *unat)
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_UNAT_RESPONSE_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
arg.unat_rep.unat = unat;
|
||||
memcpy(&(arg.unat_rep.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), btc_hf_arg_deep_copy);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
@ -232,19 +232,19 @@ esp_err_t esp_bt_hf_cmee_response(esp_bd_addr_t remote_addr, esp_hf_at_response_
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_CME_ERR_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
arg.ext_at.response_code = response_code;
|
||||
arg.ext_at.error_code = error_code;
|
||||
memcpy(&(arg.ext_at.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
|
||||
|
||||
/* Switch to BTC context */
|
||||
bt_status_t status = btc_transfer_context(&msg, &arg, sizeof(btc_hf_args_t), NULL);
|
||||
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
|
||||
}
|
||||
|
||||
esp_err_t esp_bt_hf_indchange_notification(esp_bd_addr_t remote_addr,
|
||||
esp_err_t esp_bt_hf_indchange_notification(esp_bd_addr_t remote_addr,
|
||||
esp_hf_call_status_t call_state,
|
||||
esp_hf_call_setup_status_t call_setup_state,
|
||||
esp_hf_network_state_t ntk_state, int signal)
|
||||
@ -256,7 +256,7 @@ esp_err_t esp_bt_hf_indchange_notification(esp_bd_addr_t remote_addr,
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_IND_NOTIFICATION_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.ind_change.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
@ -283,7 +283,7 @@ esp_err_t esp_bt_hf_cind_response(esp_bd_addr_t remote_addr,
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_HF;
|
||||
msg.act = BTC_HF_CIND_RESPONSE_EVT;
|
||||
|
||||
|
||||
btc_hf_args_t arg;
|
||||
memset(&arg, 0, sizeof(btc_hf_args_t));
|
||||
memcpy(&(arg.cind_rep.remote_addr), remote_addr, sizeof(esp_bd_addr_t));
|
||||
@ -526,4 +526,4 @@ void esp_hf_outgoing_data_ready(void)
|
||||
}
|
||||
#endif /* #if (BTM_SCO_HCI_INCLUDED == TRUE ) */
|
||||
|
||||
#endif // BTC_HF_INCLUDED
|
||||
#endif // BTC_HF_INCLUDED
|
||||
|
@ -116,7 +116,7 @@ typedef struct {
|
||||
} esp_blufi_ap_record_t;
|
||||
|
||||
/**
|
||||
* @brief BLUFI callback parameters union
|
||||
* @brief BLUFI callback parameters union
|
||||
*/
|
||||
typedef union {
|
||||
/**
|
||||
@ -175,7 +175,7 @@ typedef union {
|
||||
} sta_ssid; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_STA_SSID */
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief
|
||||
* ESP_BLUFI_EVENT_RECV_STA_PASSWD
|
||||
*/
|
||||
struct blufi_recv_sta_passwd_evt_param {
|
||||
@ -192,7 +192,7 @@ typedef union {
|
||||
} softap_ssid; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_SSID */
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief
|
||||
* ESP_BLUFI_EVENT_RECV_SOFTAP_PASSWD
|
||||
*/
|
||||
struct blufi_recv_softap_passwd_evt_param {
|
||||
@ -208,7 +208,7 @@ typedef union {
|
||||
} softap_max_conn_num; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_MAX_CONN_NUM */
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief
|
||||
* ESP_BLUFI_EVENT_RECV_SOFTAP_AUTH_MODE
|
||||
*/
|
||||
struct blufi_recv_softap_auth_mode_evt_param {
|
||||
@ -216,7 +216,7 @@ typedef union {
|
||||
} softap_auth_mode; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_AUTH_MODE */
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief
|
||||
* ESP_BLUFI_EVENT_RECV_SOFTAP_CHANNEL
|
||||
*/
|
||||
struct blufi_recv_softap_channel_evt_param {
|
||||
@ -229,7 +229,7 @@ typedef union {
|
||||
struct blufi_recv_username_evt_param {
|
||||
uint8_t *name; /*!< Username point */
|
||||
int name_len; /*!< Username length */
|
||||
} username; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_USERNAME*/
|
||||
} username; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_USERNAME*/
|
||||
|
||||
/**
|
||||
* @brief ESP_BLUFI_EVENT_RECV_CA_CERT
|
||||
@ -277,7 +277,7 @@ typedef union {
|
||||
esp_blufi_error_state_t state; /*!< Blufi error state */
|
||||
} report_error; /*!< Blufi callback param of ESP_BLUFI_EVENT_REPORT_ERROR */
|
||||
/**
|
||||
* @brief
|
||||
* @brief
|
||||
* ESP_BLUFI_EVENT_RECV_CUSTOM_DATA
|
||||
*/
|
||||
struct blufi_recv_custom_data_evt_param {
|
||||
@ -296,7 +296,7 @@ typedef void (* esp_blufi_event_cb_t)(esp_blufi_cb_event_t event, esp_blufi_cb_p
|
||||
/* security function declare */
|
||||
|
||||
/**
|
||||
* @brief BLUFI negotiate data handler
|
||||
* @brief BLUFI negotiate data handler
|
||||
* @param data : data from phone
|
||||
* @param len : length of data from phone
|
||||
* @param output_data : data want to send to phone
|
||||
@ -307,7 +307,7 @@ typedef void (*esp_blufi_negotiate_data_handler_t)(uint8_t *data, int len, uint8
|
||||
/**
|
||||
* @brief BLUFI encrypt the data after negotiate a share key
|
||||
* @param iv8 : initial vector(8bit), normally, blufi core will input packet sequence number
|
||||
* @param crypt_data : plain text and encrypted data, the encrypt function must support autochthonous encrypt
|
||||
* @param crypt_data : plain text and encrypted data, the encrypt function must support autochthonous encrypt
|
||||
* @param crypt_len : length of plain text
|
||||
* @return Nonnegative number is encrypted length, if error, return negative number;
|
||||
*/
|
||||
@ -316,7 +316,7 @@ typedef int (* esp_blufi_encrypt_func_t)(uint8_t iv8, uint8_t *crypt_data, int c
|
||||
/**
|
||||
* @brief BLUFI decrypt the data after negotiate a share key
|
||||
* @param iv8 : initial vector(8bit), normally, blufi core will input packet sequence number
|
||||
* @param crypt_data : encrypted data and plain text, the encrypt function must support autochthonous decrypt
|
||||
* @param crypt_data : encrypted data and plain text, the encrypt function must support autochthonous decrypt
|
||||
* @param crypt_len : length of encrypted text
|
||||
* @return Nonnegative number is decrypted length, if error, return negative number;
|
||||
*/
|
||||
@ -376,7 +376,7 @@ esp_err_t esp_blufi_profile_deinit(void);
|
||||
* @param opmode : wifi opmode
|
||||
* @param sta_conn_state : station is already in connection or not
|
||||
* @param softap_conn_num : softap connection number
|
||||
* @param extra_info : extra information, such as sta_ssid, softap_ssid and etc.
|
||||
* @param extra_info : extra information, such as sta_ssid, softap_ssid and etc.
|
||||
*
|
||||
* @return ESP_OK - success, other - failed
|
||||
*
|
||||
@ -397,7 +397,7 @@ esp_err_t esp_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list
|
||||
/**
|
||||
*
|
||||
* @brief Get BLUFI profile version
|
||||
*
|
||||
*
|
||||
* @return Most 8bit significant is Great version, Least 8bit is Sub version
|
||||
*
|
||||
*/
|
||||
|
@ -37,7 +37,7 @@ typedef enum {
|
||||
*
|
||||
*/
|
||||
esp_bluedroid_status_t esp_bluedroid_get_status(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enable bluetooth, must after esp_bluedroid_init()
|
||||
*
|
||||
|
@ -358,8 +358,8 @@ esp_err_t esp_ble_gattc_send_mtu_req (esp_gatt_if_t gattc_if, uint16_t conn_id);
|
||||
|
||||
|
||||
/**
|
||||
* @brief This function is called to get service from local cache.
|
||||
* This function report service search result by a callback
|
||||
* @brief This function is called to get service from local cache.
|
||||
* This function report service search result by a callback
|
||||
* event, and followed by a service search complete event.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
@ -815,10 +815,10 @@ esp_err_t esp_ble_gattc_cache_refresh(esp_bd_addr_t remote_bda);
|
||||
|
||||
/**
|
||||
* @brief Add or delete the associated address with the source address.
|
||||
* Note: The role of this API is mainly when the client side has stored a server-side database,
|
||||
* when it needs to connect another device, but the device's attribute database is the same
|
||||
* as the server database stored on the client-side, calling this API can use the database
|
||||
* that the device has stored used as the peer server database to reduce the attribute
|
||||
* Note: The role of this API is mainly when the client side has stored a server-side database,
|
||||
* when it needs to connect another device, but the device's attribute database is the same
|
||||
* as the server database stored on the client-side, calling this API can use the database
|
||||
* that the device has stored used as the peer server database to reduce the attribute
|
||||
* database search and discovery process and speed up the connection time.
|
||||
* The associated address mains that device want to used the database has stored in the local cache.
|
||||
* The source address mains that device want to share the database to the associated address device.
|
||||
@ -832,7 +832,7 @@ esp_err_t esp_ble_gattc_cache_refresh(esp_bd_addr_t remote_bda);
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_cache_assoc(esp_gatt_if_t gattc_if, esp_bd_addr_t src_addr,
|
||||
esp_err_t esp_ble_gattc_cache_assoc(esp_gatt_if_t gattc_if, esp_bd_addr_t src_addr,
|
||||
esp_bd_addr_t assoc_addr, bool is_assoc);
|
||||
/**
|
||||
* @brief Get the address list which has store the attribute table in the gattc cache. There will
|
||||
@ -847,7 +847,7 @@ esp_err_t esp_ble_gattc_cache_assoc(esp_gatt_if_t gattc_if, esp_bd_addr_t src_ad
|
||||
esp_err_t esp_ble_gattc_cache_get_addr_list(esp_gatt_if_t gattc_if);
|
||||
|
||||
/**
|
||||
* @brief Clean the service cache of this device in the gattc stack,
|
||||
* @brief Clean the service cache of this device in the gattc stack,
|
||||
*
|
||||
* @param[in] remote_bda: remote device BD address.
|
||||
*
|
||||
|
@ -346,7 +346,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if,
|
||||
|
||||
|
||||
/**
|
||||
* @brief Create a service attribute tab.
|
||||
* @brief Create a service attribute tab.
|
||||
* @param[in] gatts_attr_db: the pointer to the service attr tab
|
||||
* @param[in] gatts_if: GATT server access interface
|
||||
* @param[in] max_nb_attr: the number of attribute to be added to the service database.
|
||||
@ -357,12 +357,12 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if,
|
||||
* - other : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gatts_create_attr_tab(const esp_gatts_attr_db_t *gatts_attr_db,
|
||||
esp_err_t esp_ble_gatts_create_attr_tab(const esp_gatts_attr_db_t *gatts_attr_db,
|
||||
esp_gatt_if_t gatts_if,
|
||||
uint8_t max_nb_attr,
|
||||
uint8_t srvc_inst_id);
|
||||
/**
|
||||
* @brief This function is called to add an included service. This function have to be called between
|
||||
* @brief This function is called to add an included service. This function have to be called between
|
||||
* 'esp_ble_gatts_create_service' and 'esp_ble_gatts_add_char'. After included
|
||||
* service is included, a callback event ESP_GATTS_ADD_INCL_SRVC_EVT
|
||||
* is reported the included service ID.
|
||||
@ -388,7 +388,7 @@ esp_err_t esp_ble_gatts_add_included_service(uint16_t service_handle, uint16_t i
|
||||
* @param[in] char_uuid : Characteristic UUID.
|
||||
* @param[in] perm : Characteristic value declaration attribute permission.
|
||||
* @param[in] property : Characteristic Properties
|
||||
* @param[in] char_val : Characteristic value
|
||||
* @param[in] char_val : Characteristic value
|
||||
* @param[in] control : attribute response control byte
|
||||
*
|
||||
* @return
|
||||
@ -410,7 +410,7 @@ esp_err_t esp_ble_gatts_add_char(uint16_t service_handle, esp_bt_uuid_t *char_
|
||||
* be added.
|
||||
* @param[in] perm: descriptor access permission.
|
||||
* @param[in] descr_uuid: descriptor UUID.
|
||||
* @param[in] char_descr_val : Characteristic descriptor value
|
||||
* @param[in] char_descr_val : Characteristic descriptor value
|
||||
* @param[in] control : attribute response control byte
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
|
@ -402,7 +402,7 @@ esp_err_t esp_bt_hf_indchange_notification(esp_bd_addr_t remote_addr, esp_hf_cal
|
||||
*/
|
||||
esp_err_t esp_bt_hf_cind_response(esp_bd_addr_t remote_addr,
|
||||
esp_hf_call_status_t call_state,
|
||||
esp_hf_call_setup_status_t call_setup_state,
|
||||
esp_hf_call_setup_status_t call_setup_state,
|
||||
esp_hf_network_state_t ntk_state, int signal, esp_hf_roaming_status_t roam, int batt_lev,
|
||||
esp_hf_call_held_status_t call_held_status);
|
||||
|
||||
@ -423,7 +423,7 @@ esp_err_t esp_bt_hf_cops_response(esp_bd_addr_t remote_addr, char *name);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Response to AT+CLCC command from HFP Client.
|
||||
* @brief Response to AT+CLCC command from HFP Client.
|
||||
* As a precondition to use this API, Service Level Connection shall exist between AG and HF Client.
|
||||
*
|
||||
* @param[in] remote_addr: remote bluetooth device address
|
||||
@ -592,4 +592,4 @@ void esp_hf_outgoing_data_ready(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //__ESP_HF_AG_API_H__
|
||||
#endif //__ESP_HF_AG_API_H__
|
||||
|
@ -691,4 +691,3 @@ extern void bta_av_reg_vdp (tAVDT_CS *p_cs, char *p_service_name, void *p_data);
|
||||
#endif ///BTA_AV_INCLUDED == TRUE
|
||||
|
||||
#endif /* BTA_AV_INT_H */
|
||||
|
||||
|
@ -465,4 +465,3 @@ void bta_dm_co_ble_oob_support(UINT8 enable)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -486,4 +486,3 @@ BOOLEAN bta_dm_search_sm_execute(BT_HDR *p_msg)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1170,4 +1170,3 @@ tBTA_DM_CONTRL_STATE bta_dm_pm_obtain_controller_state(void)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -33,4 +33,3 @@ uint16_t BTA_GATT_GetLocalMTU(void)
|
||||
{
|
||||
return gatt_get_local_mtu();
|
||||
}
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, BD_ADDR bda, UINT16 conn_id,
|
||||
} else {
|
||||
APPL_TRACE_WARNING("%s not found connection parameters of the device ", __func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
p_buf->int_conn.hdr.layer_specific = conn_id;
|
||||
p_buf->int_conn.client_if = gattc_if;
|
||||
p_buf->int_conn.role = L2CA_GetBleConnRole(bda);
|
||||
|
@ -298,7 +298,7 @@ void BTA_GATTC_ServiceSearchRequest (UINT16 conn_id, tBT_UUID *p_srvc_uuid)
|
||||
** Returns returns list_t of tBTA_GATTC_SERVICE or NULL.
|
||||
**
|
||||
*******************************************************************************/
|
||||
const list_t* BTA_GATTC_GetServices(UINT16 conn_id)
|
||||
const list_t* BTA_GATTC_GetServices(UINT16 conn_id)
|
||||
{
|
||||
return bta_gattc_get_services(conn_id);
|
||||
}
|
||||
@ -315,7 +315,7 @@ const list_t* BTA_GATTC_GetServices(UINT16 conn_id)
|
||||
** Returns returns pointer to tBTA_GATTC_CHARACTERISTIC or NULL.
|
||||
**
|
||||
*******************************************************************************/
|
||||
const tBTA_GATTC_CHARACTERISTIC* BTA_GATTC_GetCharacteristic(UINT16 conn_id, UINT16 handle)
|
||||
const tBTA_GATTC_CHARACTERISTIC* BTA_GATTC_GetCharacteristic(UINT16 conn_id, UINT16 handle)
|
||||
{
|
||||
return bta_gattc_get_characteristic(conn_id, handle);
|
||||
}
|
||||
@ -963,7 +963,7 @@ void BTA_GATTC_CacheAssoc(tBTA_GATTC_IF client_if, BD_ADDR src_addr, BD_ADDR ass
|
||||
memcpy(p_buf->assoc_addr, assoc_addr, sizeof(BD_ADDR));
|
||||
|
||||
bta_sys_sendmsg(p_buf);
|
||||
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1070,4 +1070,3 @@ void BTA_GATTC_Broadcast(tBTA_GATTC_IF client_if, BOOLEAN start)
|
||||
}
|
||||
|
||||
#endif /* defined(GATTC_INCLUDED) && (GATTC_INCLUDED == TRUE) */
|
||||
|
||||
|
@ -2194,4 +2194,3 @@ void bta_gattc_cache_reset(BD_ADDR server_bda)
|
||||
|
||||
//#endif /* GATTC_CACHE_NVS */
|
||||
#endif /* BTA_GATT_INCLUDED */
|
||||
|
||||
|
@ -664,4 +664,3 @@ BOOLEAN bta_gattc_co_cache_clear_assoc_addr(BD_ADDR src_addr)
|
||||
// #endif /* #if( defined GATTC_CACHE_NVS ) && (GATTC_CACHE_NVS == TRUE) */
|
||||
#endif /* #if( defined BLE_INCLUDED ) && (BLE_INCLUDED == TRUE) */
|
||||
#endif /* #if( defined BTA_GATT_INCLUDED ) && (BTA_GATT_INCLUDED == TRUE) */
|
||||
|
||||
|
@ -596,7 +596,7 @@ void BTA_GATTS_SendServiceChangeIndication(tBTA_GATTS_IF server_if, BD_ADDR remo
|
||||
p_buf->hdr.event = BTA_GATTS_API_SEND_SERVICE_CHANGE_EVT;
|
||||
p_buf->server_if = server_if;
|
||||
memcpy(p_buf->remote_bda, remote_bda, BD_ADDR_LEN);
|
||||
|
||||
|
||||
bta_sys_sendmsg(p_buf);
|
||||
}
|
||||
return;
|
||||
|
@ -221,4 +221,4 @@ BOOLEAN bta_gatts_uuid_compare(tBT_UUID tar, tBT_UUID src)
|
||||
|
||||
|
||||
|
||||
#endif /* GATTS_INCLUDED */
|
||||
#endif /* GATTS_INCLUDED */
|
||||
|
@ -66,7 +66,7 @@ enum {
|
||||
BTA_GATTC_API_LISTEN_EVT,
|
||||
BTA_GATTC_API_BROADCAST_EVT,
|
||||
BTA_GATTC_API_DISABLE_EVT,
|
||||
BTA_GATTC_ENC_CMPL_EVT,
|
||||
BTA_GATTC_ENC_CMPL_EVT,
|
||||
BTA_GATTC_API_CACHE_ASSOC_EVT,
|
||||
BTA_GATTC_API_CACHE_GET_ADDR_LIST_EVT,
|
||||
};
|
||||
@ -75,7 +75,7 @@ typedef UINT16 tBTA_GATTC_INT_EVT;
|
||||
#define BTA_GATTC_SERVICE_CHANGED_LEN 4
|
||||
|
||||
typedef enum {
|
||||
BTA_GATTC_SERVICE_INFO_FROM_REMOTE_DEVICE = 0,
|
||||
BTA_GATTC_SERVICE_INFO_FROM_REMOTE_DEVICE = 0,
|
||||
BTA_GATTC_SERVICE_INFO_FROM_NVS_FLASH = 1,
|
||||
BTA_GATTC_SERVICE_INFO_FROM_UNKNOWN = 2,
|
||||
} tBTA_SERVICE_SOURCE_t;
|
||||
|
@ -261,4 +261,3 @@ extern tBTA_GATTS_SRVC_CB *bta_gatts_find_srvc_cb_by_attr_id(tBTA_GATTS_CB *p_cb
|
||||
extern void bta_gatts_deinit(void);
|
||||
|
||||
#endif /* BTA_GATTS_INT_H */
|
||||
|
||||
|
@ -300,7 +300,7 @@ void BTA_AgSetCodec(UINT16 handle, tBTA_AG_PEER_CODEC codec)
|
||||
#if (BTM_SCO_HCI_INCLUDED == TRUE )
|
||||
/************************************************************************************************
|
||||
* Function BTA_AgCiData
|
||||
*
|
||||
*
|
||||
* Description Trigger the lower-layer to fetch and send audio data. This function is only
|
||||
* only used in the case that Voice Over HCI is enabled. Precondition is that
|
||||
* the HFP audio connection is connected. After this function is called, lower
|
||||
@ -319,4 +319,4 @@ void BTA_AgCiData(UINT16 handle)
|
||||
}
|
||||
#endif /* #if (BTM_SCO_HCI_INCLUDED == TRUE ) */
|
||||
|
||||
#endif /* #if (BTA_AG_INCLUDED == TRUE)*/
|
||||
#endif /* #if (BTA_AG_INCLUDED == TRUE)*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user