Fixed MCU events (thanks to @SonoSooS).

This commit is contained in:
profi200 2020-08-27 00:01:35 +02:00
parent e70f80d408
commit 4b7fe6adf0
No known key found for this signature in database
GPG Key ID: 17B42AE5911139F3
2 changed files with 4 additions and 4 deletions

View File

@ -130,7 +130,7 @@ void LGYFB_init(void)
/*
* Limitations:
* First pattern bit must be 1 and last 0 or it loses sync with the DS/GBA input.
* First pattern bit must be 1 and last 0 (for V-scale) or it loses sync with the DS/GBA input.
*
* Matrix ranges:
* in[-3] -1024-1023 (0xFC00-0x03FF)

View File

@ -24,7 +24,7 @@
static bool g_mcuIrq = false;
static u32 g_events = 0;
static u32 g_mcuEvents = 0;
@ -80,7 +80,7 @@ bool MCU_setEventMask(u32 mask)
u32 MCU_getEvents(u32 mask)
{
u32 events = g_events;
u32 events = g_mcuEvents;
if(atomic_load_explicit(&g_mcuIrq, memory_order_relaxed))
{
@ -92,7 +92,7 @@ u32 MCU_getEvents(u32 mask)
events |= data;
}
g_mcuIrq = events & ~mask;
g_mcuEvents = events & ~mask;
return events & mask;
}