Remove include HAP.h from SRP
SRP now only requires Utils (for TempBuffer). Also, moved HS_ALLOC definitions into Utils so it can be re-used by others files
This commit is contained in:
parent
cd85cc1629
commit
ffe56e7261
|
|
@ -31,18 +31,6 @@
|
||||||
#error ERROR: HOMESPAN IS ONLY AVAILABLE FOR ESP32 MICROCONTROLLERS!
|
#error ERROR: HOMESPAN IS ONLY AVAILABLE FOR ESP32 MICROCONTROLLERS!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BOARD_HAS_PSRAM)
|
|
||||||
#define HS_MALLOC ps_malloc
|
|
||||||
#define HS_CALLOC ps_calloc
|
|
||||||
#define HS_REALLOC ps_realloc
|
|
||||||
#define ps_new(X) new(ps_malloc(sizeof(X)))X
|
|
||||||
#else
|
|
||||||
#define HS_MALLOC malloc
|
|
||||||
#define HS_CALLOC calloc
|
|
||||||
#define HS_REALLOC realloc
|
|
||||||
#define ps_new(X) new X
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wpmf-conversions" // eliminates warning messages from use of pointers to member functions to detect whether update() and loop() are overridden by user
|
#pragma GCC diagnostic ignored "-Wpmf-conversions" // eliminates warning messages from use of pointers to member functions to detect whether update() and loop() are overridden by user
|
||||||
#pragma GCC diagnostic ignored "-Wunused-result" // eliminates warning message regarded unused result from call to crypto_scalarmult_curve25519()
|
#pragma GCC diagnostic ignored "-Wunused-result" // eliminates warning message regarded unused result from call to crypto_scalarmult_curve25519()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#include "SRP.h"
|
#include "SRP.h"
|
||||||
#include "HAP.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
12
src/SRP.h
12
src/SRP.h
|
|
@ -31,17 +31,7 @@
|
||||||
#include <mbedtls/bignum.h>
|
#include <mbedtls/bignum.h>
|
||||||
#include <mbedtls/base64.h>
|
#include <mbedtls/base64.h>
|
||||||
|
|
||||||
#if defined(BOARD_HAS_PSRAM)
|
#include "Utils.h"
|
||||||
#define HS_MALLOC ps_malloc
|
|
||||||
#define HS_CALLOC ps_calloc
|
|
||||||
#define HS_REALLOC ps_realloc
|
|
||||||
#define ps_new(X) new(ps_malloc(sizeof(X)))X
|
|
||||||
#else
|
|
||||||
#define HS_MALLOC malloc
|
|
||||||
#define HS_CALLOC calloc
|
|
||||||
#define HS_REALLOC realloc
|
|
||||||
#define ps_new(X) new X
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
// Pair-Setup Code Verification Data and Salt
|
// Pair-Setup Code Verification Data and Salt
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,13 @@
|
||||||
#if defined(BOARD_HAS_PSRAM)
|
#if defined(BOARD_HAS_PSRAM)
|
||||||
#define HS_MALLOC ps_malloc
|
#define HS_MALLOC ps_malloc
|
||||||
#define HS_CALLOC ps_calloc
|
#define HS_CALLOC ps_calloc
|
||||||
|
#define HS_REALLOC ps_realloc
|
||||||
|
#define ps_new(X) new(ps_malloc(sizeof(X)))X
|
||||||
#else
|
#else
|
||||||
#define HS_MALLOC malloc
|
#define HS_MALLOC malloc
|
||||||
#define HS_CALLOC calloc
|
#define HS_CALLOC calloc
|
||||||
|
#define HS_REALLOC realloc
|
||||||
|
#define ps_new(X) new X
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue