I have a master which sends the data through SPI which is to displayed on the LCD of resolution 128 X 64. Here in my project I need to read that data but 1byte at a time. So how can I use the sub_fifo_read() to do the same or please suggest any other way to do that.
I tried this way:
rc = sub_fifo_read( hndl, in_buff,1,100);
but it returns a value -5 and sometimes 0.
read 1 byte data
Moderator: serg
-
- Posts: 12
- Joined: Tue Mar 22, 2011 9:46 am
read 1 byte data
Last edited by sreejith6320 on Tue Apr 26, 2011 12:58 pm, edited 2 times in total.
Re: read 1 byte data
Let's use the latest snapshot , i.e the SUB-20-snap-110319.tgz,
So first, modify the source
1.
change the libusb.c, line 1989
from
to
2. Comment out the
from
to
Rebuild the library.
Now, call the sub_fifo_read function again and let me know what you get
So first, modify the source
1.
change the libusb.c, line 1989
from
Code: Select all
rc = libusb_bulk_transfer( hndl, SUB_FIFO_IN_EP, (unsigned char*)buf,
Code: Select all
rc = libusb_bulk_transfer( hndl, SUB_FIFO_IN_EP, (unsigned char*)tmp_buf,
from
Code: Select all
#define ASYNC_OUT
Code: Select all
/*
#define ASYNC_OUT
*/
Now, call the sub_fifo_read function again and let me know what you get
-
- Posts: 12
- Joined: Tue Mar 22, 2011 9:46 am
Re: read 1 byte data
Sorry, it was returning -7 by mistake I wrote -5 which corresponds to bulk write failed
Re: read 1 byte data
So what do you get now, i.e after applying all the fixes above?