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:
parent
af01bfed91
commit
7a7ce06d66
46 changed files with 2364 additions and 1531 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
@ -59,7 +59,7 @@ uint32_t xTaskGetTickCount(void)
|
|||
}
|
||||
|
||||
/// Queue mock
|
||||
QueueHandle_t xQueueCreate( uint32_t uxQueueLength, uint32_t uxItemSize )
|
||||
QueueHandle_t xQueueCreate(uint32_t uxQueueLength, uint32_t uxItemSize)
|
||||
{
|
||||
g_size = uxItemSize;
|
||||
g_queue = malloc((uxQueueLength) * (uxItemSize));
|
||||
|
@ -67,7 +67,7 @@ QueueHandle_t xQueueCreate( uint32_t uxQueueLength, uint32_t uxItemSize )
|
|||
}
|
||||
|
||||
|
||||
void vQueueDelete( QueueHandle_t xQueue )
|
||||
void vQueueDelete(QueueHandle_t xQueue)
|
||||
{
|
||||
free(xQueue);
|
||||
}
|
||||
|
@ -117,7 +117,46 @@ void esp_log_write(esp_log_level_t level, const char *tag, const char *format, .
|
|||
{
|
||||
}
|
||||
|
||||
void esp_log(esp_log_config_t config, const char *tag, const char *format, ...)
|
||||
{
|
||||
}
|
||||
|
||||
uint32_t esp_log_timestamp(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *mdns_mem_malloc(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *mdns_mem_calloc(size_t num, size_t size)
|
||||
{
|
||||
return calloc(num, size);
|
||||
}
|
||||
|
||||
void mdns_mem_free(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
char *mdns_mem_strdup(const char *s)
|
||||
{
|
||||
return strdup(s);
|
||||
}
|
||||
|
||||
char *mdns_mem_strndup(const char *s, size_t n)
|
||||
{
|
||||
return strndup(s, n);
|
||||
}
|
||||
|
||||
void *mdns_mem_task_malloc(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void mdns_mem_task_free(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -38,6 +38,10 @@
|
|||
#define ESP_ERR_INVALID_RESPONSE 0x108
|
||||
#define ESP_ERR_INVALID_CRC 0x109
|
||||
|
||||
#define MDNS_TASK_MEMORY_LOG "internal RAM"
|
||||
#define MALLOC_CAP_8BIT (1<<2)
|
||||
#define MALLOC_CAP_INTERNAL (1<<11)
|
||||
|
||||
#define pdTRUE true
|
||||
#define pdFALSE false
|
||||
#define pdPASS ( pdTRUE )
|
||||
|
@ -62,6 +66,7 @@
|
|||
#define vSemaphoreDelete(s) free(s)
|
||||
#define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U
|
||||
#define xTaskCreatePinnedToCore(a,b,c,d,e,f,g) *(f) = malloc(1)
|
||||
#define xTaskCreateStaticPinnedToCore(a,b,c,d,e,f,g,h) true
|
||||
#define vTaskDelay(m) usleep((m)*0)
|
||||
#define esp_random() (rand()%UINT32_MAX)
|
||||
|
||||
|
@ -79,7 +84,8 @@ typedef void *QueueHandle_t;
|
|||
typedef void *TaskHandle_t;
|
||||
typedef int BaseType_t;
|
||||
typedef uint32_t TickType_t;
|
||||
|
||||
typedef void *StackType_t;
|
||||
typedef void *StaticTask_t;
|
||||
|
||||
struct udp_pcb {
|
||||
uint8_t dummy;
|
||||
|
@ -111,10 +117,10 @@ uint32_t xTaskGetTickCount(void);
|
|||
typedef void (*esp_timer_cb_t)(void *arg);
|
||||
|
||||
// Queue mock
|
||||
QueueHandle_t xQueueCreate( uint32_t uxQueueLength,
|
||||
uint32_t uxItemSize );
|
||||
QueueHandle_t xQueueCreate(uint32_t uxQueueLength,
|
||||
uint32_t uxItemSize);
|
||||
|
||||
void vQueueDelete( QueueHandle_t xQueue );
|
||||
void vQueueDelete(QueueHandle_t xQueue);
|
||||
|
||||
uint32_t xQueueSend(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait);
|
||||
|
||||
|
@ -131,6 +137,6 @@ esp_err_t esp_event_handler_unregister(const char *event_base, int32_t event_id,
|
|||
|
||||
TaskHandle_t xTaskGetCurrentTaskHandle(void);
|
||||
void xTaskNotifyGive(TaskHandle_t task);
|
||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time);
|
||||
|
||||
#endif //_ESP32_COMPAT_H_
|
||||
|
|
|
@ -243,7 +243,7 @@ int main(int argc, char **argv)
|
|||
//
|
||||
// Note: parameter1 is a file (mangled packet) which caused the crash
|
||||
file = fopen(argv[1], "r");
|
||||
assert(file >= 0 );
|
||||
assert(file >= 0);
|
||||
len = fread(buf, 1, 1460, file);
|
||||
fclose(file);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue