error fix

This commit is contained in:
yichin
2020-05-15 12:36:43 +08:00
parent d354e3e7c3
commit 59e0fe25fa
2 changed files with 7 additions and 7 deletions
@@ -61,13 +61,13 @@ static LED_Status GLEDStatus = LED_OFF;
static UART_Status UARTStatus = UART_IDLE;
static void mem_central_event() {
if (flag_mask(EVT_NEU_SPI)) {
if (flag_mask(EVT_MEM_LED)) {
flag_disable(EVT_MEM_LED);
GLEDStatus = LED_ON;
SetMemOutputPIN(Board_GLED, 1);
}
if(flag_mask(EVT_NEU_SPI_OFF)){
if(flag_mask(EVT_MEM_LED_OFF)){
flag_disable(EVT_MEM_LED_OFF);
GLEDStatus = LED_OFF;
SetMemOutputPIN(Board_GLED, 0);
@@ -5,7 +5,7 @@
/**
* test event [flag] has been enabled.
*/
#define flag_mask(flag) ((EVENT_MASK & (flag)) != 0)
#define flag_mask(flag) ((EventMask & (flag)) != 0)
/**
* enable event [flag].
@@ -13,7 +13,7 @@
#define flag_enable(flag) \
do { \
uint8 __key = Hwi_disable(); \
EVENT_MASK |= (uint16_t)(flag); \
EventMask |= (uint16_t)(flag); \
Hwi_restore(__key); \
} while (0)
@@ -23,7 +23,7 @@
#define flag_disable(flag) \
do { \
uint8 __key = Hwi_disable(); \
EVENT_MASK &= ~((uint16_t)(flag)); \
EventMask &= ~((uint16_t)(flag)); \
Hwi_restore(__key); \
} while (0)
@@ -33,9 +33,9 @@
#define flag_notify(flag) \
do { \
uint8 __key = Hwi_disable(); \
EVENT_MASK |= (uint16_t)(flag); \
EventMask |= (uint16_t)(flag); \
Hwi_restore(__key); \
Semaphore_post(semaphore); \
Semaphore_post(sem); \
} while (0)
/** event */