Всякие тесты неинтересные

This commit is contained in:
2026-09-24 07:58:47 +03:00
parent ad33d0de79
commit 040853e7dc
14 changed files with 456 additions and 32 deletions

View File

@@ -8,7 +8,8 @@
#include <esp_task_wdt.h>
#include <esp_timer.h>
#include <esp32-hal-cpu.h>
#include <soc/gpio_struct.h>
#include <soc/gpio_reg.h>
#include <soc/soc.h>
#include <string.h>
#if CONFIG_IDF_TARGET_ESP32C3
#include <riscv/rv_utils.h>
@@ -204,7 +205,7 @@ void IRAM_ATTR DriverTest::pollTaskLoop() {
constexpr uint32_t PIN_MASK = (1UL << GPIO_PWM) | (1UL << GPIO_RX);
for (;;) {
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
uint32_t levels = GPIO.in.val & PIN_MASK;
uint32_t levels = REG_READ(GPIO_IN_REG) & PIN_MASK;
uint32_t nextStart = 0;
uint32_t windowEnd = 0;
uint32_t lastTxStart = 0;
@@ -216,7 +217,7 @@ void IRAM_ATTR DriverTest::pollTaskLoop() {
uint32_t interruptState = 0;
auto sampleOnce = [&]() {
const uint32_t current = GPIO.in.val & PIN_MASK;
const uint32_t current = REG_READ(GPIO_IN_REG) & PIN_MASK;
if (current == levels) return;
const uint32_t now = esp_cpu_get_cycle_count();
const uint32_t changed = current ^ levels;