- Removed unnecessary calls to relay_chn_create and g_is_component_initialized in multiple test cases across test_relay_chn_core_single.c, test_relay_chn_listener_multi.c, and test_relay_chn_listener_single.c. - Introduced new test files for NVS functionality: test_relay_chn_nvs_multi.c and test_relay_chn_nvs_single.c, covering initialization, direction setting, invalid parameters, and erase operations. - Updated partition table configuration to support NVS storage, including the addition of a new partition file part_nvs.csv. - Adjusted sdkconfig files to enable NVS support and configure custom partition settings for relay channels.
26 lines
589 B
C
26 lines
589 B
C
#pragma once
|
|
|
|
#include <string.h> // For memset
|
|
#include "unity.h"
|
|
#include "relay_chn.h"
|
|
#include "esp_log.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
|
|
// Test log tag
|
|
extern const char *TEST_TAG;
|
|
|
|
// GPIO configurations
|
|
extern const uint8_t gpio_map[];
|
|
extern const uint8_t gpio_count;
|
|
extern const uint8_t relay_chn_count;
|
|
|
|
// Config variables for tests
|
|
extern const uint32_t opposite_inertia_ms;
|
|
extern const uint32_t test_delay_margin_ms;
|
|
|
|
// Init state
|
|
extern bool g_is_component_initialized;
|
|
|
|
// Reset channels to Idle state
|
|
void reset_channels_to_idle_state(void); |