Actualiser EfiClock/UefiMain.c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Pierre Guillod 2024-04-01 15:56:30 +02:00
parent 4e9b249e4e
commit f511cbc772

View file

@ -83,6 +83,11 @@ EFI_STATUS EFIAPI UefiEntry(IN EFI_HANDLE imgHandle, IN EFI_SYSTEM_TABLE* sysTab
UINT16 second, minute, hour; UINT16 second, minute, hour;
const UINT32 accentColor = 0xFFAB3F, idleColor = 0x555555; const UINT32 accentColor = 0xFFAB3F, idleColor = 0x555555;
UINTN EventIndex = 0;
EFI_EVENT Event = NULL;
status = gBS->CreateEvent(EVT_TIMER, TPL_CALLBACK, (EFI_EVENT_NOTIFY)NULL, (VOID*)NULL, &Event);
status = gBS->SetTimer(Event, TimerPeriodic, 1e6);
while(1) while(1)
{ {
gRT->GetTime(&Time, NULL); gRT->GetTime(&Time, NULL);
@ -110,7 +115,7 @@ EFI_STATUS EFIAPI UefiEntry(IN EFI_HANDLE imgHandle, IN EFI_SYSTEM_TABLE* sysTab
hour & 0b01000 ? drawRectangle(col0,row2,sq_sid,sq_sid,accentColor) : drawRectangle(col0,row2,sq_sid,sq_sid,idleColor); hour & 0b01000 ? drawRectangle(col0,row2,sq_sid,sq_sid,accentColor) : drawRectangle(col0,row2,sq_sid,sq_sid,idleColor);
hour & 0b10000 ? drawRectangle(col0,row1,sq_sid,sq_sid,accentColor) : drawRectangle(col0,row1,sq_sid,sq_sid,idleColor); hour & 0b10000 ? drawRectangle(col0,row1,sq_sid,sq_sid,accentColor) : drawRectangle(col0,row1,sq_sid,sq_sid,idleColor);
MicroSecondDelay(1e6); status = gBS->WaitForEvent(1, Event, &EventIndex);
} }
return EFI_SUCCESS; return EFI_SUCCESS;