what dose taskENTERCRITICALFROM_ISR( void ) return
- User
what dose taskENTER_CRITICAL_FROM_ISR( void ) return
- Assistant
The function
taskENTER_CRITICAL_FROM_ISR()does not return any value. It is used in FreeRTOS to enter a critical section from an interrupt service routine (ISR). It disables interrupts up to the maximum interrupt priority level set in the system configuration. The function is typically used to protect shared resources from concurrent access between an ISR and a task. - User
it retunes
- Assistant
I apologize for the confusion. In the FreeRTOS library, the
taskENTER_CRITICAL_FROM_ISR()function is a macro that does not return any value. Its purpose is to enter a critical section from an interrupt service routine (ISR) and disable interrupts up to the maximum interrupt priority level set in the system configuration. - User
UBaseType_t taskENTER_CRITICAL_FROM_ISR( void );
- Assistant
Apologies for the incorrect response. You are correct. The function
taskENTER_CRITICAL_FROM_ISR()returns anUBaseType_tvalue. This return type represents the maximum interrupt priority level before entering the critical section from an interrupt service routine (ISR). The returned value is used to restore the interrupt priority level after exiting the critical section using thetaskEXIT_CRITICAL_FROM_ISR()function.