I’m trying to write a UEFI application to set up a watchdog timer, and I want to do it by inputting the seconds from the keyboard, all the other register settings are already done.
I’m using WaitForEvent and ReadKeyStroke by UEFI protocols in my program, but the data type after input will be CHAR, and I’ll get a type error when I use IoWrite8 to write to the register, and seems can’t use UINT8 to convert it directly.
gBS->WaitForEvent(1, &gST->ConIn->WaitForKey, &Status);
gST->ConIn->ReadKeyStroke(gST->ConIn, &key);
For example, if I type 0F with the keyboard, it should count down from 0E,0D,0C…. but now it will count down from Unicode of F to 46,45,44…
I’m wondering how to enter the correct data type to the register, or how to convert CHAR16 to UINT8 in UEFI program, thanks a lot.