mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(etm): move etm_periph.c to hal component
This commit is contained in:
@@ -10,15 +10,15 @@
|
||||
#include "freertos/task.h"
|
||||
#include "unity.h"
|
||||
#include "esp_etm.h"
|
||||
#include "soc/etm_periph.h"
|
||||
#include "hal/etm_periph.h"
|
||||
|
||||
TEST_CASE("etm_channel_install_uninstall", "[etm]")
|
||||
{
|
||||
printf("install etm channels exhaustively\r\n");
|
||||
esp_etm_channel_handle_t etm_chans[SOC_ETM_ATTR(INST_NUM)][SOC_ETM_ATTR(CHANS_PER_INST)];
|
||||
esp_etm_channel_handle_t etm_chans[ETM_LL_GET(INST_NUM)][ETM_LL_GET(CHANS_PER_INST)];
|
||||
esp_etm_channel_config_t config = {};
|
||||
for (int i = 0; i < SOC_ETM_ATTR(INST_NUM); i++) {
|
||||
for (int j = 0; j < SOC_ETM_ATTR(CHANS_PER_INST); j++) {
|
||||
for (int i = 0; i < ETM_LL_GET(INST_NUM); i++) {
|
||||
for (int j = 0; j < ETM_LL_GET(CHANS_PER_INST); j++) {
|
||||
TEST_ESP_OK(esp_etm_new_channel(&config, &etm_chans[i][j]));
|
||||
}
|
||||
TEST_ESP_ERR(ESP_ERR_NOT_FOUND, esp_etm_new_channel(&config, &etm_chans[0][0]));
|
||||
@@ -30,8 +30,8 @@ TEST_CASE("etm_channel_install_uninstall", "[etm]")
|
||||
TEST_ESP_ERR(ESP_ERR_INVALID_STATE, esp_etm_del_channel(etm_chans[0][0]));
|
||||
TEST_ESP_OK(esp_etm_channel_disable(etm_chans[0][0]));
|
||||
|
||||
for (int i = 0; i < SOC_ETM_ATTR(INST_NUM); i++) {
|
||||
for (int j = 0; j < SOC_ETM_ATTR(CHANS_PER_INST); j++) {
|
||||
for (int i = 0; i < ETM_LL_GET(INST_NUM); i++) {
|
||||
for (int j = 0; j < ETM_LL_GET(CHANS_PER_INST); j++) {
|
||||
TEST_ESP_OK(esp_etm_del_channel(etm_chans[i][j]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user