Change PendSV function signature to use enum

This commit is contained in:
Angus Gratton 2015-05-07 13:54:41 +10:00
parent c3c531240e
commit ee95fde5ec
2 changed files with 8 additions and 14 deletions

View file

@ -107,11 +107,6 @@ pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *p
return sp; return sp;
} }
enum SVC_ReqType {
SVC_Software = 1,
SVC_MACLayer = 2,
};
static int pending_soft_sv; static int pending_soft_sv;
static int pending_maclayer_sv; static int pending_maclayer_sv;
@ -126,7 +121,7 @@ static int pending_maclayer_sv;
In the original esp_iot_rtos_sdk implementation, arg was a char. Using an In the original esp_iot_rtos_sdk implementation, arg was a char. Using an
enum is ABI-compatible, though. enum is ABI-compatible, though.
*/ */
void PendSV( char req ) void PendSV(enum SVC_ReqType req)
{ {
vPortEnterCritical(); vPortEnterCritical();

View file

@ -107,16 +107,15 @@ typedef unsigned int INT32U;
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text"))) #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
enum SVC_ReqType {
SVC_Software = 1,
SVC_MACLayer = 2,
};
/* Scheduler utilities. */ /* Scheduler utilities. */
extern void PendSV(char); extern void PendSV(enum SVC_ReqType);
//#define portYIELD() vPortYield() //#define portYIELD() vPortYield()
#define portYIELD() PendSV(1) #define portYIELD() PendSV(SVC_Software)
//#define portEND_SWITCHING_ISR( xSwitchRequired ) \
// if(xSwitchRequired) PendSV(1)
#define HDL_MAC_SIG_IN_LV1_ISR() PendSV(2)
/* Task utilities. */ /* Task utilities. */
#define portEND_SWITCHING_ISR( xSwitchRequired ) \ #define portEND_SWITCHING_ISR( xSwitchRequired ) \