Hey,
I working on AT91SAM9M10 evaluation board currently running android
2.1.
during kernel device development, I'm working with buildroot, for
easier module manipulation.
I finished writing my char device, and it's working on build root.
once you open the device file, and read from it, you get the right
data back.
however, when I replaced build root with the androidfs. when I'm
running the same test program, I get different results from the
device.
The kernel is the same, so I don't really understand why I get
different results.

The test program, is fairly simple, I included it below, if you want
me to post also the device driver source I can. can you think of a
reason why the device would send a different data ?
---------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/ioctl.h>


int main()
{

        int fd;
        int read_value = 0;
        fd = open("/dev/wiegand0",O_RDONLY);

        while (1)
        {
                if (read(fd,&read_value,sizeof(int)))
                        {
                        if (read_value == 2762) printf("Zohar, Welcome...number 
2762\n");
                                else
                                        if (read_value == 2763) printf("Ramon, 
Welcome...number 2763\n");
                                                else printf("I don't know the 
person. %d\n",read_value);
                        }
        }
}
---------------------------------------

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to