Skip to content

Instantly share code, notes, and snippets.

@winocm
Created April 20, 2021 02:29
Show Gist options
  • Save winocm/46f0e9f312016d5b541b68ea66aebb74 to your computer and use it in GitHub Desktop.
Save winocm/46f0e9f312016d5b541b68ea66aebb74 to your computer and use it in GitHub Desktop.
: 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