esp-rtosLogger
printf style logging that costs the caller about a microsecond: arguments go raw into a ring of the caller's own core, a FreeRTOS task formats them later.
Установка
Последняя опубликованная версия- Скачайте архив — реестр отдает его уже проверенным.
- В Arduino IDE выберите «Скетч → Подключить библиотеку → Добавить .ZIP библиотеку».
- Укажите скачанный файл — библиотека появится в списке доступных.
SHA-256:0ae925f2e033f74991237b9d6514313d0d49d7e804bdd022293a1ae82e148bb6esp_rtosLogger-0.4.1-0ae925f2.zipОписание
logI("rpm=%d temp=%.2f", rpm, temp) writes the raw arguments into a ring of the caller's own core, with that core's interrupts masked for the write, so no lock is ever shared between cores. A low priority task formats the lines with the real snprintf and sends them to Serial, or to the outputs you make, batched. logBin(struct) sends a plain struct as bytes instead, read back on the other board with logBinRead. Safe from interrupts and from any number of tasks. Measured on an ESP32-S3 under a SimpleFOC drive: 0.9 us mean, 1.4 us worst from a loop in IRAM, 0.5 us from an interrupt; 4.4 us on an nRF52840. Runs on ESP32 (Arduino-ESP32 3.x) and nRF52 (Adafruit core).