- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I use slave fifo project example now, and i willing to insert i2c function.
So i found some i2c files in "Target₩Lib₩LP₩" i2c.c and i2c_rw.c ...,.
I really want to know which one is need to i2c function in slave fifo.
Could you please let me know what am i including files in slave project example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dv2,
i2c_hw.c uses the I2C hardware block present in the FX2LP.
i2c_sw.c uses two GPIOs to implement the software I2C.
You can use any of them based on your need.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do you mean by
?
i2c_rw.c uses the I2C hardware block present in the FX2LP.
i2c.c uses two GPIOs to implement the software I2C.
????????????????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I mean function like following.
void EZUSB_InitI2C(void);
BOOL EZUSB_WriteI2C_(BYTE addr, BYTE length, BYTE xdata *dat);
BOOL EZUSB_ReadI2C_(BYTE addr, BYTE length, BYTE xdata *dat);
BOOL EZUSB_WriteI2C(BYTE addr, BYTE length, BYTE xdata *dat);
BOOL EZUSB_ReadI2C(BYTE addr, BYTE length, BYTE xdata *dat);
void EZUSB_WaitForEEPROMWrite(BYTE addr);
Is there any reference document?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Addinglyabove post,
I want to know how can i use that function in firmware and how can i call from windows application program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Addinglyabove post,
I want to know how can i use that function in firmware and how can i call from windows application program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lee
the function
BOOL EZUSB_WriteI2C_(BYTE addr, BYTE length, BYTE xdata *dat) has three parameters. The first parameter is for the addres, second one is for length of data to be followed, third is the pointer to data. The first byte," addr" will be shifted left by one bit and the last bit will be made either zero(write) or 1 (read). You can get the definition of
BOOL EZUSB_WriteI2C_ in the i2c.c file.
Regards
Vikas.