Pulled in the latest SystemK (with new BLE). (#2)

The new spec is here: [KTag Beacon Specification v0.11](https://ktag.clubk.club/Technology/BLE/KTag%20Beacon%20Specification%20v0.11.pdf)

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #2
This commit is contained in:
Joe Kearney 2025-06-08 22:05:06 +00:00
parent af01bfed91
commit 7a7ce06d66
46 changed files with 2364 additions and 1531 deletions

View file

@ -0,0 +1,65 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Allocate memory.
* @param size Number of bytes to allocate.
* @return Pointer to allocated memory, or NULL on failure.
*/
void *mdns_mem_malloc(size_t size);
/**
* @brief Allocate and zero memory.
* @param num Number of elements.
* @param size Size of each element.
* @return Pointer to allocated memory, or NULL on failure.
*/
void *mdns_mem_calloc(size_t num, size_t size);
/**
* @brief Free allocated memory.
* @param ptr Pointer to memory to free.
*/
void mdns_mem_free(void *ptr);
/**
* @brief Duplicate a string.
* @param s String to duplicate.
* @return Pointer to duplicated string, or NULL on failure.
*/
char *mdns_mem_strdup(const char *s);
/**
* @brief Duplicate a string with length limit.
* @param s String to duplicate.
* @param n Maximum number of characters to copy.
* @return Pointer to duplicated string, or NULL on failure.
*/
char *mdns_mem_strndup(const char *s, size_t n);
/**
* @brief Allocate memory for mDNS task.
* @param size Number of bytes to allocate.
* @return Pointer to allocated memory, or NULL on failure.
*/
void *mdns_mem_task_malloc(size_t size);
/**
* @brief Free allocated memory for mDNS task.
* @param ptr Pointer to memory to free.
*/
void mdns_mem_task_free(void *ptr);
#ifdef __cplusplus
}
#endif

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -103,12 +103,6 @@
#define MDNS_PACKET_QUEUE_LEN 16 // Maximum packets that can be queued for parsing
#define MDNS_ACTION_QUEUE_LEN CONFIG_MDNS_ACTION_QUEUE_LEN // Maximum actions pending to the server
#define MDNS_TXT_MAX_LEN 1024 // Maximum string length of text data in TXT record
#if defined(CONFIG_LWIP_IPV6) && defined(CONFIG_MDNS_RESPOND_REVERSE_QUERIES)
#define MDNS_NAME_MAX_LEN (64+4) // Need to account for IPv6 reverse queries (64 char address + ".ip6" )
#else
#define MDNS_NAME_MAX_LEN 64 // Maximum string length of hostname, instance, service and proto
#endif
#define MDNS_NAME_BUF_LEN (MDNS_NAME_MAX_LEN+1) // Maximum char buffer size to hold hostname, instance, service or proto
#define MDNS_MAX_PACKET_SIZE 1460 // Maximum size of mDNS outgoing packet
#define MDNS_HEAD_LEN 12