change default to bluetooth disabled

This commit is contained in:
Klaus K Wilting committed 2018-12-02 14:08:50 +01:00
1 parent 8d22695114
commit decb8b7181
18 files changed
+163 -49

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
// Copyright 2018-2018 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef __COEXIST_INTERNAL_H__
#define __COEXIST_INTERNAL_H__
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
COEX_PREFER_WIFI = 0,
COEX_PREFER_BT,
COEX_PREFER_BALANCE,
COEX_PREFER_NUM,
} coex_prefer_t;
/**
* @brief Init software coexist
* extern function for internal use.
*
* @return Init ok or failed.
*/
esp_err_t coex_init(void);
/**
* @brief De-init software coexist
* extern function for internal use.
*/
void coex_deinit(void);
/**
* @brief Pause software coexist
* extern function for internal use.
*/
void coex_pause(void);
/**
* @brief Resume software coexist
* extern function for internal use.
*/
void coex_resume(void);
/**
* @brief Get software coexist version string
* extern function for internal use.
* @return : version string
*/
const char *coex_version_get(void);
/**
* @brief Coexist performance preference set from libbt.a
* extern function for internal use.
*
* @param prefer : the prefer enumeration value
* @return : ESP_OK - success, other - failed
*/
esp_err_t coex_preference_set(coex_prefer_t prefer);
#ifdef __cplusplus
}
#endif
#endif /* __COEXIST_INTERNAL_H__ */
+5 -4
View File
@@ -9,6 +9,10 @@
#include <array>
#include <algorithm>
// sniffing types
#define MAC_SNIFF_WIFI 0
#define MAC_SNIFF_BLE 1
// bits in payloadmask for filtering payload data
#define GPS_DATA (0x01)
#define ALARM_DATA (0x02)
@@ -93,6 +97,7 @@ extern TaskHandle_t irqHandlerTask, wifiSwitchTask;
#include "led.h"
#include "payload.h"
#include "blescan.h"
#ifdef HAS_GPS
#include "gpsread.h"
@@ -114,10 +119,6 @@ extern TaskHandle_t irqHandlerTask, wifiSwitchTask;
#include "button.h"
#endif
#ifdef BLECOUNTER
#include "blescan.h"
#endif
#ifdef HAS_BATTERY_PROBE
#include "battery.h"
#endif
+3
View File
@@ -16,4 +16,7 @@
#include "spislave.h"
#include "lorawan.h"
#include <esp_coexist.h>
#include "coexist_internal.h"
#endif
+1 -1
View File
@@ -39,7 +39,7 @@ public:
void reset(void);
uint8_t getSize(void);
uint8_t *getBuffer(void);
void addCount(uint16_t value1, uint16_t value2);
void addCount(uint16_t value, uint8_t sniffytpe);
void addConfig(configData_t value);
void addStatus(uint16_t voltage, uint64_t uptime, float cputemp, uint32_t mem,
uint8_t reset1, uint8_t reset2);
-3
View File
@@ -7,9 +7,6 @@
// Hash function for scrambling MAC addresses
#include "hash.h"
#define MAC_SNIFF_WIFI 0
#define MAC_SNIFF_BLE 1
void wifi_sniffer_init(void);
void IRAM_ATTR wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type);
void switchWifiChannel(void * parameter);