- Add full message catalogs and content for French (fr) and German (de) - Implement ASCII canonical slugs for French and German routes - Add language-specific search endpoints (/api/busca/fr, /api/busca/de) - Configure strict 404 responses for /fr/livro and /de/livro - Localize SEO, OpenGraph (fr_FR, de_DE), Twitter and JSON-LD schemas - Add localized code example comments across 14 examples for fr and de - Enable 'fr' and 'de' in ENABLED_LOCALES with root negotiation and redirect - Extend test suite in check-i18n, smoke-imagem and verifica-vazamentos Co-Authored-By: Antigravity <noreply@google.com>
57 lines
1.6 KiB
C
57 lines
1.6 KiB
C
/*
|
|
* ESP-IDF v5.x+ Beispiel für ESP32
|
|
* Demonstration von Systeminitialisierung, FreeRTOS-Task-Management und einheitlichem Logging
|
|
*
|
|
* Komponentenverwaltung (main/idf_component.yml):
|
|
* dependencies:
|
|
* espressif/led_strip: "^2.5.0"
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "driver/gpio.h"
|
|
#include "esp_log.h"
|
|
#include "esp_system.h"
|
|
#include "esp_chip_info.h"
|
|
|
|
static const char *TAG = "main_app";
|
|
|
|
#define BLINK_GPIO GPIO_NUM_2 // Passen Sie dies an den LED-Pin Ihres Boards an
|
|
|
|
static void blink_task(void *pvParameters)
|
|
{
|
|
// Konfiguriert den GPIO-Pin mit der neuen ESP-IDF-API
|
|
gpio_reset_pin(BLINK_GPIO);
|
|
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
|
|
|
|
bool led_state = false;
|
|
|
|
while (1) {
|
|
led_state = !led_state;
|
|
gpio_set_level(BLINK_GPIO, led_state);
|
|
|
|
ESP_LOGI(TAG, "LED %s | Freier Heap: %lu Bytes",
|
|
led_state ? "EIN" : "AUS",
|
|
(unsigned long)esp_get_free_heap_size());
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
}
|
|
}
|
|
|
|
void app_main(void)
|
|
{
|
|
// Informações do chip SoC
|
|
esp_chip_info_t chip_info;
|
|
esp_chip_info(&chip_info);
|
|
|
|
ESP_LOGI(TAG, "===========================================");
|
|
ESP_LOGI(TAG, " Iniciando ESP-IDF v5.x Modern Application ");
|
|
ESP_LOGI(TAG, " Modelo do Chip: %d | Núcleos: %d | Rev: %d",
|
|
chip_info.model, chip_info.cores, chip_info.revision);
|
|
ESP_LOGI(TAG, "===========================================");
|
|
|
|
// Cria uma tarefa FreeRTOS dedicada
|
|
xTaskCreate(blink_task, "blink_task", 3072, NULL, 5, NULL);
|
|
}
|