I am not sure if this helps, but i had a similar requirement to update the
slots file after boot and this is how I achieved it:
1. wrote a .sh script
2. call the .sh script from cron at reboot.
*Contents of hkgpiotest1cape.sh*
#!/bin/sh -
echo HK-GPIO-Test1 > /sys/devices/bone_capemgr.8/slots
*Contents of cron:*
root@beaglebone:~# crontab -l
@reboot /home/root/hkgpiotest1cape.sh
Thanks,
Hitesh
On Saturday, December 21, 2013 10:09:54 AM UTC-8, Dhanushka Jayaweera wrote:
>
> modified *uEnv.txt *file located in */boot/uboot*
>
> optargs=capemgr.enable_partno=BB-UART1,BB-UART4,cape-bone-iio
>
> didnt work
>
> On Saturday, December 21, 2013 9:29:19 PM UTC+5:30, Dhanushka Jayaweera
> wrote:
>>
>> well I tried this from my c++ code.
>>
>> #include<cstdio>
>>>
>>> #include<cstdlib>
>>>
>>> #include<unistd.h>
>>>
>>> using namespace std;
>>>
>>>
>>>> int main() {
>>>
>>> system("echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots");
>>>
>>> return 0;
>>>
>>> }
>>>
>>>
>> but it doesnt work
>>
>> On Saturday, December 21, 2013 3:33:00 PM UTC+5:30, Dhanushka Jayaweera
>> wrote:
>>>
>>> hey guys,
>>>
>>> I'm trying to read some voltages from ADC pins.
>>> I have been using this code to set the pins. echo cape-bone-iio >
>>> /sys/devices/bone_capemgr.*/slots
>>> It works, but whenever I restart my BBB, I have to type this code again.
>>>
>>> Can I set it permanently?
>>>
>>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.