mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Matter automatic ifdefs (#18002)
This commit is contained in:
parent
64083c902e
commit
dcbf50a918
@ -301,7 +301,7 @@ BERRY_LOCAL bclass_array be_class_table = {
|
||||
#endif // USE_UFILESYS
|
||||
&be_native_class(AudioOpusDecoder),
|
||||
#endif // USE_I2S_AUDIO_BERRY
|
||||
#ifdef USE_BERRY_INT64
|
||||
#if defined(USE_BERRY_INT64) || defined(USE_MATTER_DEVICE)
|
||||
&be_native_class(int64),
|
||||
#endif
|
||||
#endif // TASMOTA
|
||||
|
@ -67,18 +67,6 @@ extern const bclass be_class_md5;
|
||||
#include "be_fixed_be_class_hkdf_sha256.h"
|
||||
#include "be_fixed_crypto.h"
|
||||
|
||||
// Enable all the crypto required by Matter
|
||||
#ifdef USE_BERRY_CRYPTO_SPAKE2P_MATTER
|
||||
#undef USE_BERRY_CRYPTO_EC_P256
|
||||
#define USE_BERRY_CRYPTO_EC_P256
|
||||
#undef USE_BERRY_CRYPTO_HMAC_SHA256
|
||||
#define USE_BERRY_CRYPTO_HMAC_SHA256
|
||||
#undef USE_BERRY_CRYPTO_HKDF_SHA256
|
||||
#define USE_BERRY_CRYPTO_HKDF_SHA256
|
||||
#undef USE_BERRY_CRYPTO_AES_CCM
|
||||
#define USE_BERRY_CRYPTO_AES_CCM
|
||||
#endif
|
||||
|
||||
const be_const_member_t be_crypto_members[] = {
|
||||
// name with prefix '/' indicates a Berry class
|
||||
// entries need to be sorted (ignoring the prefix char)
|
||||
|
@ -1278,6 +1278,34 @@
|
||||
#define USE_TLS // flag indicates we need to include TLS code
|
||||
#endif
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Post-process compile options for Matter
|
||||
\*********************************************************************************************/
|
||||
|
||||
#ifdef ESP32
|
||||
#ifdef USE_MATTER_DEVICE
|
||||
#undef USE_DISCOVERY
|
||||
#define USE_DISCOVERY
|
||||
|
||||
// Enable all the crypto required by Matter
|
||||
#undef USE_BERRY_CRYPTO_EC_P256
|
||||
#define USE_BERRY_CRYPTO_EC_P256
|
||||
#undef USE_BERRY_CRYPTO_HMAC_SHA256
|
||||
#define USE_BERRY_CRYPTO_HMAC_SHA256
|
||||
#undef USE_BERRY_CRYPTO_HKDF_SHA256
|
||||
#define USE_BERRY_CRYPTO_HKDF_SHA256
|
||||
#undef USE_BERRY_CRYPTO_AES_CCM
|
||||
#define USE_BERRY_CRYPTO_AES_CCM
|
||||
#undef USE_BERRY_CRYPTO_AES_CTR
|
||||
#define USE_BERRY_CRYPTO_AES_CTR
|
||||
#undef USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256
|
||||
#define USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256
|
||||
#undef USE_BERRY_CRYPTO_SPAKE2P_MATTER
|
||||
#define USE_BERRY_CRYPTO_SPAKE2P_MATTER
|
||||
|
||||
#endif // USE_MATTER_DEVICE
|
||||
#endif
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Post-process stack size adjustment
|
||||
\*********************************************************************************************/
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <berry.h>
|
||||
#include "berry_tasmota.h"
|
||||
#ifdef USE_MATTER
|
||||
#ifdef USE_MATTER_DEVICE
|
||||
#include "berry_matter.h"
|
||||
#endif
|
||||
#include "be_vm.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user