Failed to send alphabets to BIOS page using pico-sdk library. #1744
manabendup
started this conversation in
General
Replies: 1 comment
-
Moved to discussion because this is not a core library problem. As has been said before, a boot keyboard HID is different from a normal one. See the TinyUSB example And the USB IF HID tables and the USB HID DCD for lower level info. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the Board type - Raspberry pi pico, USB Stack - pico SDK. I would like to send alphabets to the BIOS page.
If I boot to the Internal UEFI shell, then I am able to send numbers to this page. Unfortunately, I am not able to send alphabets to either BIOS or to UEFI shell.
I have made the following changes in the pico-sdk library.
%localappdata%\Arduino15\packages\rp2040\hardware\rp2040\3.3.1\cores\rp2040\ RP2040USB.cpp
In the function: void __SetupUSBDescriptor()
I updated to,
TUD_HID_DESCRIPTOR(hid_itf, 0, HID_ITF_PROTOCOL_KEYBOARD, hid_report_len, EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 10)
instead of HID_ITF_PROTOCOL_NONE
the above change helped me send keystrokes (UP/DOWN/ENTER/ESC/F4 keys) to BIOS/UEFI shell. With HID_ITF_PROTOCOL_NONE, I was not able to send keystrokes in BIOS/UEFI.
what I have noticed is that, when we send the press/write call using the keyboard library, then the implementation is handled in.
%localappdata%\Arduino15\packages\rp2040\hardware\rp2040\3.3.1\libraries\HID_Keyboard\src\ HID_Keyboard.cpp
this uses the layout as defined in the file: KeyboardLayout_en_US.cpp (same folder) and the data is picked from extern const uint8_t KeyboardLayout_en_US[128] PROGMEM =
This has the mapping between the ASCII code of the character and the character that needs to be printed on the display.
for example, say if I press '1'. then as per the above mapping, '0x1e' is used to print '1'. The same holds for each and every number. However, as per the mapping, '0x1c' is mapped for the character 'y'. If I press 'Y' / 'y', then the printing does not show up in the display.
In the file, 'KeyboardLayout_en_US.cpp', if I replace, 'Ox1c' with '0x1e' for 'y', then when I press 'y', the number '1' gets printed in BIOS.
I will need help on how we can print the alphabets in the BIOS.
thank you.
Beta Was this translation helpful? Give feedback.
All reactions