25 lines
616 B
C++
25 lines
616 B
C++
//
|
|
// Created by erki on 11/06/23.
|
|
//
|
|
|
|
#include <cstdint>
|
|
|
|
#include "esp_now.h"
|
|
#include "driver/uart.h"
|
|
|
|
namespace
|
|
{
|
|
|
|
template<std::size_t N>
|
|
constexpr auto STR_LEN(const char (&s)[N])
|
|
{
|
|
return N;
|
|
}
|
|
|
|
static_assert(STR_LEN(CONFIG_ESPTNL_PMK) == ESP_NOW_KEY_LEN + 1, "CONFIG_ESPTNL_PMK must be of length 16 bytes + 1 null terminator.");
|
|
static_assert(STR_LEN(CONFIG_ESPTNL_LMK) == ESP_NOW_KEY_LEN + 1, "CONFIG_ESPTNL_LMK must be of length 16 bytes + 1 null terminator.");
|
|
|
|
static_assert(CONFIG_ESPTNL_UART < UART_NUM_MAX && CONFIG_ESPTNL_UART >= 0, "CONFIG_ESPTNL_UART must be within range [0, UART_NUM_MAX[.");
|
|
|
|
}
|