Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^12: Controlling USB on Raspberry Pi

by stevieb (Canon)
on Dec 13, 2020 at 16:43 UTC ( #11125118=note: print w/replies, xml ) Need Help??


in reply to Re^11: Controlling USB on Raspberry Pi
in thread Controlling USB on Raspberry Pi

" I've also looked at RPi::WiringPi which again uses system but this time calls the RPi utility gpio and also uses `echo`".

The *only* place RPi::WiringPi shells out with system is where there is no other API call that can perform the tasks. Note that where you see system calls is only when operating the disk I/O LED and power LED, and in a couple of pieces of functionality to manually exporting and un-exporting pins. These calls are very, very rarely used in normal operation, and are literally for functionality I use to have, but removed it from public use, so realistically, they are now developer only functions.

All GPIO functions, including interrupts and PWM are direct C calls that manipulate the hardware registers directly. This provides a vast increase in speed and performance, especially when dealing with more time sensitive operations.

Just wanted to clear that up.

RPi::WiringPi is a distribution that manages a couple dozen other distributions. The GPIO pin functionality is found in RPi::Pin. Almost all of the core functionality that performs tasks on the Pi itself are run through my WiringPi::API C/C++ library. The only functionality that's within the main RPi::WiringPi distribution are board-level functions, utility and helper functions, and code to load up all of the other various distributions for pins, ICs, devices etc. Have a look at the RPi:: distributions in my CPAN directory to get a bit better understanding of what I mean.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11125118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-08-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?