First Ethernet activation

This commit is contained in:
2024-08-17 17:19:47 +02:00
parent 0d90973842
commit d5dc6dae46
10 changed files with 216 additions and 35 deletions

View File

@ -6,8 +6,12 @@
#include "constants.h"
#include "string.h"
#include "esp_log.h"
#define DEV_PREFIX "ESP32 "
static const char *TAG = "dev_name";
bool dev_generate_name()
{
// Check if a device name has already been defined
@ -29,7 +33,7 @@ char *dev_name()
char *dev = malloc(len + strlen(DEV_PREFIX) + 1);
if (dev == NULL)
{
printf("Failed to allocate memory to store dev name!\n");
ESP_LOGE(TAG, "Failed to allocate memory to store dev name!\n");
return NULL;
}