cxx/esp_hw_support: added build test, changed parameter types

Changed rv_utils_intr_edge_ack and esp_cpu_intr_edge_ack to
take uint32_t instead of int to avoid build errors.

The test is to test in particular that __builtin_ffsll, used in
xt_utils.h, which is included via esp_cpu.h, compiles fine
in C++20 with -Wsign-conversion enabled.

Closes https://github.com/espressif/esp-idf/pull/10895
This commit is contained in:
Jakob Hasse
2023-04-25 14:32:36 +08:00
parent 14724d1cb9
commit ca44fc3847
4 changed files with 47 additions and 3 deletions
+2 -2
View File
@@ -413,9 +413,9 @@ FORCE_INLINE_ATTR void esp_cpu_intr_edge_ack(int intr_num)
{
assert(intr_num >= 0 && intr_num < SOC_CPU_INTR_NUM);
#ifdef __XTENSA__
xthal_set_intclear(1 << intr_num);
xthal_set_intclear((unsigned) (1 << intr_num));
#else
rv_utils_intr_edge_ack(intr_num);
rv_utils_intr_edge_ack((unsigned) intr_num);
#endif
}