LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   strange bash command (http://www.linuxquestions.org/questions/linux-general-1/strange-bash-command-4175447440/)

djdjdjole 01-27-2013 02:49 PM

strange bash command
 
Hello

Those are three lines, that I saw at site related to RPi. Still, I consider this forum to be the right one for placing my question.

root@raspberrypi:~# modprobe i2c-dev
root@raspberrypi:~# modprobe rtc-pcf8563
root@raspberrypi:~# echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-0/new_device

I want to ask someone to explain me the meaning of third line ie. what does it do ?
The matter is related to RTC chip (pcf8563), which has I2C bus and the (software) way of accessing it.

Regards

sag47 01-27-2013 03:14 PM

/sys/class/i2c-adapter/i2c-0/new_device will Instantiate a new device from user-space. File new_device takes 2 parameters: the name of the I2C device (a string) and the address of the I2C device (a number, typically expressed in hexadecimal starting with 0x, but can also be expressed in decimal.) Read more (docs)

Source 1
pcf8563 likely refers to "Real-time clock/calendar".

Hope that helps. I found it by downloading the kernel source code and then finding keywords using "grep -irl".

SAM

djdjdjole 01-28-2013 01:29 AM

Thank you Sag47 for your effort and quick unswer - I'm going to read docs you proposed. Hope I'll comprehend.


All times are GMT -5. The time now is 05:07 AM.