Reading from arduino serial in a kernel module
by SappyInsane from LinuxQuestions.org on (#5SY7G)
Hi
I want to create a battery driver which would get information from an arduino board connected to an USB port. I figured out I'd have to make it as a kernel module.
So for now I just want to be able to read data from the arduino and printk it.
I was able to find an userspace program which reads the serial by opening a device file (in my system the arduino shows up as /dev/ttyACM0). However it seems like I shouldn't read a file from within a kernel module.
What is a proper way to read data from an arduino serial port in a kernel module?
Thanks in advance. :)
I want to create a battery driver which would get information from an arduino board connected to an USB port. I figured out I'd have to make it as a kernel module.
So for now I just want to be able to read data from the arduino and printk it.
I was able to find an userspace program which reads the serial by opening a device file (in my system the arduino shows up as /dev/ttyACM0). However it seems like I shouldn't read a file from within a kernel module.
What is a proper way to read data from an arduino serial port in a kernel module?
Thanks in advance. :)