![]() I am new to linux and device drivers, any help would be appreciated. Just to check if something was wrong with the file descriptor, I passed a dummy file descriptor to ioctl and I got the correct error number. Printf("ERROR: ioctl failed Reason:%s FD:%d\n", strerror(errno), fDDevice) ![]() IoctlReturn = ioctl(fDDevice, c_controlLED1, &sLedControlParam) ![]() Printf("ERROR: Cannot open the device /dev/newdevice_drv\n") * Prepare the message to be sent to Kernel Space */įDDevice = open("/dev/newdevice_drv", O_RDWR) Then I wrote a program in user plane to control the LED on the board, but my ioctl is failing with error number as 2 (No such File or Directory), the file descriptor returned is 3. I have created a device file in /dev directory with the correct major number. I have written the device driver and successfully loaded it. I am trying to control a LED on a custom board.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |