Created
April 20, 2021 02:29
-
-
Save winocm/46f0e9f312016d5b541b68ea66aebb74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: process-children ( phandle -- ) | |
cr ." =========================================================================" | |
cr ." Device node: " | |
dup get-package-path 2dup find-device type .properties | |
cr ." Methods: " words | |
>dn.child @ | |
begin dup while | |
dup recurse | |
>dn.peer @ | |
repeat | |
drop | |
; | |
: print-all-devices ( -- ) | |
active-package | |
cr " /" find-device | |
?active-package | |
process-children | |
active-package! | |
; | |
print-all-devices |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment