mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-28 05:47:45 +00:00
NimBLE: Fix compilation warnings and errors
1. Remove networking macros from endian.h. They are not used in NimBLE (only used in socket transport, which our port does not use) 2. nvs_handle => nvs_handle_t 3. rom/queue.h => sys/queue.h
This commit is contained in:
committed by
Abhinav Kudnar
parent
630443511e
commit
895623861d
@@ -96,7 +96,7 @@ get_nvs_db_value(int obj_type, char *key_string, union ble_store_value *val)
|
||||
{
|
||||
esp_err_t err;
|
||||
size_t required_size = 0;
|
||||
nvs_handle nimble_handle;
|
||||
nvs_handle_t nimble_handle;
|
||||
|
||||
err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle);
|
||||
if (err != ESP_OK) {
|
||||
@@ -191,7 +191,7 @@ static int
|
||||
ble_nvs_delete_value(int obj_type, int8_t index)
|
||||
{
|
||||
esp_err_t err;
|
||||
nvs_handle nimble_handle;
|
||||
nvs_handle_t nimble_handle;
|
||||
char key_string[NIMBLE_NVS_STR_NAME_MAX_LEN];
|
||||
|
||||
if (index > get_nvs_max_bonds(obj_type)) {
|
||||
@@ -227,7 +227,7 @@ error:
|
||||
static int
|
||||
ble_nvs_write_key_value(char *key, const void *value, size_t required_size)
|
||||
{
|
||||
nvs_handle nimble_handle;
|
||||
nvs_handle_t nimble_handle;
|
||||
esp_err_t err;
|
||||
|
||||
err = nvs_open(NIMBLE_NVS_NAMESPACE, NVS_READWRITE, &nimble_handle);
|
||||
|
||||
@@ -137,6 +137,8 @@ extern "C" {
|
||||
#define htonll ntohll
|
||||
#endif
|
||||
|
||||
/* These are not used in NimBLE and ESP-IDF uses them from LwIP */
|
||||
#if 0
|
||||
#ifndef ntohl
|
||||
#define ntohl(x) os_bswap_32(x)
|
||||
#endif
|
||||
@@ -152,6 +154,7 @@ extern "C" {
|
||||
#ifndef ntohs
|
||||
#define ntohs htons
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef htobe16
|
||||
#define htobe16(x) os_bswap_16(x)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define _QUEUE_H_
|
||||
|
||||
/* The common BSD linked list queue macros are already defined here for ESP-IDF */
|
||||
#include <rom/queue.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
/*
|
||||
* This file defines circular queues. The other types of data structures:
|
||||
* singly-linked lists, singly-linked tail queues, lists and tail queues
|
||||
* are used from rom/queue.h
|
||||
* are used from sys/queue.h
|
||||
*
|
||||
* A singly-linked list is headed by a single forward pointer. The elements
|
||||
* are singly linked for minimum space and pointer manipulation overhead at
|
||||
|
||||
Reference in New Issue
Block a user