mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos: fix build warnings with -Wsign-conversion CFLAG
Closes https://github.com/espressif/esp-idf/issues/4946
This commit is contained in:
parent
39f3e082e1
commit
2c84db95d2
@ -314,7 +314,7 @@ void vPortSetStackWatchpoint(void *pxStackStart);
|
|||||||
*/
|
*/
|
||||||
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
||||||
{
|
{
|
||||||
return (uint32_t) cpu_hal_get_core_id();
|
return (BaseType_t) cpu_hal_get_core_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* @deprecated This function is deprecated. Call portSET_INTERRUPT_MASK_FROM_ISR() instead
|
* @deprecated This function is deprecated. Call portSET_INTERRUPT_MASK_FROM_ISR() instead
|
||||||
*/
|
*/
|
||||||
static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(void) {
|
static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(void) {
|
||||||
return portSET_INTERRUPT_MASK_FROM_ISR();
|
return (UBaseType_t) portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,7 +30,7 @@ static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(
|
|||||||
*/
|
*/
|
||||||
static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseType_t prev_level)
|
static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseType_t prev_level)
|
||||||
{
|
{
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level);
|
portCLEAR_INTERRUPT_MASK_FROM_ISR((int) prev_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------- Spinlocks --------------------- */
|
/* ---------------------- Spinlocks --------------------- */
|
||||||
|
@ -568,7 +568,7 @@ static inline UBaseType_t xPortSetInterruptMaskFromISR(void)
|
|||||||
static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level)
|
static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level)
|
||||||
{
|
{
|
||||||
portbenchmarkINTERRUPT_RESTORE(prev_level);
|
portbenchmarkINTERRUPT_RESTORE(prev_level);
|
||||||
XTOS_RESTORE_JUST_INTLEVEL(prev_level);
|
XTOS_RESTORE_JUST_INTLEVEL((int) prev_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------ Critical Sections --------------------
|
// ------------------ Critical Sections --------------------
|
||||||
@ -631,7 +631,7 @@ static inline bool IRAM_ATTR xPortCanYield(void)
|
|||||||
|
|
||||||
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
|
||||||
{
|
{
|
||||||
return (uint32_t) cpu_hal_get_core_id();
|
return (BaseType_t) cpu_hal_get_core_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set)
|
static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set)
|
||||||
|
@ -108,7 +108,7 @@ static inline void cpu_ll_set_watchpoint(int id,
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
||||||
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_SET_CSR_FIELD(CSR_TDATA1, TDATA1_MATCH, 1);
|
RV_SET_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH, 1);
|
||||||
// add 0 in napot encoding
|
// add 0 in napot encoding
|
||||||
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
||||||
if (on_read) {
|
if (on_read) {
|
||||||
@ -126,7 +126,7 @@ static inline void cpu_ll_clear_watchpoint(int id)
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR_FIELD(CSR_TDATA1,TDATA1_MATCH);
|
RV_CLEAR_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
||||||
return;
|
return;
|
||||||
|
@ -106,7 +106,7 @@ static inline void cpu_ll_set_watchpoint(int id,
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
||||||
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_SET_CSR_FIELD(CSR_TDATA1, TDATA1_MATCH, 1);
|
RV_SET_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH, 1);
|
||||||
// add 0 in napot encoding
|
// add 0 in napot encoding
|
||||||
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
||||||
if (on_read) {
|
if (on_read) {
|
||||||
@ -124,7 +124,7 @@ static inline void cpu_ll_clear_watchpoint(int id)
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR_FIELD(CSR_TDATA1,TDATA1_MATCH);
|
RV_CLEAR_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
||||||
return;
|
return;
|
||||||
|
@ -108,7 +108,7 @@ static inline void cpu_ll_set_watchpoint(int id,
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
RV_SET_CSR(CSR_TCONTROL, TCONTROL_MPTE | TCONTROL_MTE);
|
||||||
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_SET_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_SET_CSR_FIELD(CSR_TDATA1, TDATA1_MATCH, 1);
|
RV_SET_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH, 1);
|
||||||
// add 0 in napot encoding
|
// add 0 in napot encoding
|
||||||
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
addr_napot = ((uint32_t) addr) | ((size >> 1) - 1);
|
||||||
if (on_read) {
|
if (on_read) {
|
||||||
@ -126,7 +126,7 @@ static inline void cpu_ll_clear_watchpoint(int id)
|
|||||||
RV_WRITE_CSR(tselect,id);
|
RV_WRITE_CSR(tselect,id);
|
||||||
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
RV_CLEAR_CSR(CSR_TCONTROL,TCONTROL_MTE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_USER|TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR_FIELD(CSR_TDATA1,TDATA1_MATCH);
|
RV_CLEAR_CSR_FIELD(CSR_TDATA1, (long unsigned int) TDATA1_MATCH);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_MACHINE);
|
||||||
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
RV_CLEAR_CSR(CSR_TDATA1, TDATA1_LOAD|TDATA1_STORE|TDATA1_EXECUTE);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user