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
+1 -1
View File
@@ -102,7 +102,7 @@ FORCE_INLINE_ATTR uint32_t rv_utils_intr_get_enabled_mask(void)
return REG_READ(INTERRUPT_CORE0_CPU_INT_ENABLE_REG);
}
FORCE_INLINE_ATTR void rv_utils_intr_edge_ack(int intr_num)
FORCE_INLINE_ATTR void rv_utils_intr_edge_ack(unsigned int intr_num)
{
REG_SET_BIT(INTERRUPT_CORE0_CPU_INT_CLEAR_REG, intr_num);
}