LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SDIO Host Driver from User space (https://www.linuxquestions.org/questions/linux-newbie-8/sdio-host-driver-from-user-space-4175471712/)

pravinchanm 08-01-2013 05:04 AM

SDIO Host Driver from User space
 
Hi all,

I tried to write a SDIO host driver to send commands to the SDIO device. When I included the header files like "linux/mmc/sdio.h" and all other relevant header files to SDIO. It is throwing error on compilation when i simply created the instance for the structure "struct mmc_host *mmc".

Warning : Kernel header files should not be accessed from user space.
Followed by the above lot of errors.

I am using Ubuntu 12.04 64bit machine. I had the vub300 USB to SDIO card driver pre installed. When I connected USB to SDIO host controller the card is detected as the memory device.

For compilation : gcc /usr/src/-I/usr/src/linux-headers-3.5.0-36/arch/x86/include/ -I/usr/src/linux-headers-3.5.0-36/include -o host.exe mmc_host.c

Previously I had developed the UART driver by simply including the file termios.h and the simple read() write() of ttyS0 device. Now also I am expecting to do so for SDIO device.

Kindly help me to develop a SDIO host driver to send various commands like (CMD52) (CMD53) to interface with the SDIO device.


#include<stdio.h>

#include"linux/mmc/host.h"
#include"linux/mmc/sdio_func.h"
#include"linux/mmc/sdio_ids.h"

struct mmc_host func;

void main()
{
}

pan64 08-01-2013 06:08 AM

duplicate of http://www.linuxquestions.org/questi...ce-4175471713/

onebuck 08-01-2013 08:34 AM

Moderator Response
 
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. Thread http://www.linuxquestions.org/questi...ce-4175471713/ is being closed because it is a duplicate.


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