Dear All,
Please Look in the below Code : consider the Name of File Test.c
Consider this as reference file.
int main(int argc,char **argv)
{
int fd=open("/dev/samsungled",O_RDWR);
int arg;
if(argc==1)
arg=0x00;
else if(argc==2)
{
arg=atoi(argv[1]);
}
if(arg>15)
arg=0;
printf("%d\n",arg);
printf("=============TEST BEGIN=============\n");
if(fd == -1)
{
printf("Open File Error\n");
exit(0);
}
if(ioctl(fd,arg,0)==-1)
{
printf("Ioctl Error\n");
exit(0);
}
printf("==============TEST END===============\n");
close(fd);
}
I have added the Device Driver Module for Blinking LED with Some IOCTL calls in the Kernel. Under driver directory.
I have to Link the Application Code i.e this file with the kernel or consider that I have already register device of UART. i have to access the UART receive and Transmit function if i write a application code somewhat in this manner.
1. In which folder should i Place the Files.
2. How the Files will be Linked with kerenel.
Please Your Guidence is needed. I am Using TAM-3517 standard board and Kernel is LInux-2.6.32.
Thanks and Regard's
Prag Rao.