add USE_MD5

This commit is contained in:
Tomasz Duda 2024-08-20 17:40:52 +02:00
parent 6882e8cc2d
commit d5ee6fbed0
6 changed files with 13 additions and 3 deletions

View file

@ -1,6 +1,7 @@
#include <cstdio>
#include <cstring>
#include "hmac_md5.h"
#ifdef USE_MD5
#include "esphome/core/helpers.h"
namespace esphome {
@ -54,3 +55,4 @@ bool HmacMD5::equals_hex(const char *expected) { return this->ohash_.equals_hex(
} // namespace hmac_md5
} // namespace esphome
#endif

View file

@ -1,8 +1,8 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_MD5
#include "esphome/components/md5/md5.h"
#ifndef USE_ZEPHYR
#include <string>
namespace esphome {

View file

@ -1 +1,7 @@
import esphome.codegen as cg
CODEOWNERS = ["@esphome/core"]
async def to_code(config):
cg.add_define("USE_MD5")

View file

@ -1,6 +1,7 @@
#include <cstdio>
#include <cstring>
#include "md5.h"
#ifdef USE_MD5
#include "esphome/core/helpers.h"
namespace esphome {
@ -65,3 +66,4 @@ bool MD5Digest::equals_hex(const char *expected) {
} // namespace md5
} // namespace esphome
#endif

View file

@ -1,6 +1,7 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_MD5
#ifdef USE_ESP_IDF
#include "esp_rom_md5.h"
@ -27,8 +28,6 @@
#define MD5_CTX_TYPE LT_MD5_CTX_T
#endif
#ifndef USE_ZEPHYR
namespace esphome {
namespace md5 {

View file

@ -45,6 +45,7 @@
#define USE_LVGL_KEY_LISTENER
#define USE_LVGL_TOUCHSCREEN
#define USE_LVGL_ROTARY_ENCODER
#define USE_MD5
#define USE_MDNS
#define USE_MEDIA_PLAYER
#define USE_NEXTION_TFT_UPLOAD