dd support for a USB keyboard as the NxConsole and text widget input. Not fully functional as of this initial check-in. Basic functionality is there, but there are conditions were the keyboard gets lost.
This commit is contained in:
parent
40e27add0b
commit
7e4e5ee543
@ -4060,30 +4060,27 @@ Configurations
|
|||||||
recognized.
|
recognized.
|
||||||
|
|
||||||
The USB keyboard is configured to replace the NSH stdin device some
|
The USB keyboard is configured to replace the NSH stdin device some
|
||||||
that NSH will take input from the USB keyboard. These are the
|
that NSH will take input from the USB keyboard. This has to be
|
||||||
relevant configuration options:
|
done a little differently for the case of NxWM::CNxConsoles than
|
||||||
|
in the standard NSH configuration. Here the relevant configuration
|
||||||
|
options are:
|
||||||
|
|
||||||
CONFIG_NSH_USBKBD=y
|
CONFIG_NXWM_KEYBOARD_USBHOST=y
|
||||||
CONFIG_NSH_USBKBD_DEVNAME="/dev/kbda"
|
CONFIG_NXWM_KEYBOARD_DEVPATH="/dev/kbda"
|
||||||
|
|
||||||
When NSH comes up, it will attempt to open /dev/kbda and replace
|
NSH will then automatically start when the NxConsole is started:
|
||||||
stdin with that device. If no USB keyboard is connected when you
|
|
||||||
start the NxConsole, you will see:
|
|
||||||
|
|
||||||
Waiting for a keyboard...
|
|
||||||
|
|
||||||
NSH will then automatically start when the keyboard is attached:
|
|
||||||
|
|
||||||
NuttShell (NSH) NuttX-7.3
|
NuttShell (NSH) NuttX-7.3
|
||||||
nsh>
|
nsh>
|
||||||
|
|
||||||
If the keyboard is detached, NSH will stop and wait for you to
|
When the NxConsole comes up, it will attempt to use /dev/kbda device
|
||||||
re-attach the keyboard:
|
for input. Obviously, you cannot enter text if there is no keyboard
|
||||||
|
but otherwise you will not see any indication whether a keyboard is
|
||||||
|
connected or not.
|
||||||
|
|
||||||
nsh> nsh: nsh_session: readline failed: 1
|
If the keyboard is detached, you not be able to enter text until the
|
||||||
Please re-connect the keyboard...
|
keyboard is reconnected. Again, there is no other special indication
|
||||||
|
of the keyboard state.
|
||||||
And the session will restart when the keyboard is reconnected.
|
|
||||||
|
|
||||||
The keyboard is currently configured to poll at 80 MSec intervals.
|
The keyboard is currently configured to poll at 80 MSec intervals.
|
||||||
That might not be fast enough for you if you are a fast typist. This
|
That might not be fast enough for you if you are a fast typist. This
|
||||||
|
Loading…
Reference in New Issue
Block a user