[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] printk() is not triggered with the data passed in the application program
Hi Kunal,
Kunal Kishore wrote:
> WRITE Data from user 0 hex
...
> static ssize_t MY_Driver_write(struct file *file, const char *buf, size_t
count, loff_t *ppos)
> {
> u8 data;
>
> if (copy_from_user(&data, buf, sizeof(data)))
> return -EFAULT;
> printk("WRITE Data from user %x hex\n", data);
> outb(data, OUTPORT);
> return 0;
> }
...
> data=0x0f;
...
> if(write(handle, &data, 1, 0) < 0)
...
printk with %i or %d in the format string definitely works here.
1) Try to use %i instead of your %x
2) Try to printk your buf in MY_Driver_write
3) copy_from_user isn't necessary since there's no MMU on this platform.
I think outb(0) doesn't switch on any LED.
CU, F@lk
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/