Files
ESPDocs/public/exemplos/fr/esp-idf.c
T
Lucas RayanandAntigravity 7fce46b9e1
CI / Lint e auditorias (push) Successful in 49s
CI / Trivy (dependências e segredos) (push) Successful in 11s
CI / Imagem Docker (linux/arm64) (push) Successful in 3m14s
feat(i18n): French and German localization (phase 5)
- 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>
2026-11-01 22:06:36 -03:00

57 lines
1.6 KiB
C

/*
* Exemple ESP-IDF v5.x+ pour ESP32
* Démonstration d'initialisation système, gestion des tâches FreeRTOS et journalisation unifiée
*
* Gestion des composants (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 // Ajustez selon la broche de la LED de votre carte
static void blink_task(void *pvParameters)
{
// Configure la broche GPIO avec la nouvelle API ESP-IDF
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 | Tas libre : %lu octets",
led_state ? "ALLUMÉ" : "ÉTEINT",
(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);
}