[Vm-dev] Interfacing with the i/o pins on the Raspberry Pi et al

Hans-Martin Mosner hmm at heeg.de
Wed Aug 26 21:13:57 UTC 2015


Am 26.08.2015 um 20:13 schrieb Bert Freudenberg:
>  
>
>
>> On 26.08.2015, at 19:54, tim Rowledge <tim at rowledge.org> wrote:
>>
>>
>>
>> On 26-08-2015, at 10:37 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>> Otherwise I’d go for a lightweight plugin solution using direct IO:
>>>
>>> http://elinux.org/RPi_GPIO_Code_Samples#Direct_register_access
>>>
>>> Advantage (besides being most efficient) is that there are no dependencies at all, and it does look pretty trivial. 
>> I’m not 100% sure but I think that approach requires sudo etc.
> How does WiringPi get around that?
If it accesses the registers directly via mem-mapped access to I/O space, it has to run as root, there's no way around it.
A socket-based solution is probably cleanest as it keeps the critical code that runs with elevated privs reasonably small.
Any other IPC mechanism might do just as well (Don't know whether there is a significant difference, though).

Cheers,
Hans-Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150826/ebe21179/attachment.htm


More information about the Vm-dev mailing list