This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
[Bug 1001397] I2C driver for Kinetis microcontrollers
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-patches at ecos dot sourceware dot org
- Date: Sat, 20 Apr 2013 20:09:11 +0000
- Subject: [Bug 1001397] I2C driver for Kinetis microcontrollers
- Auto-submitted: auto-generated
- References: <bug-1001397-104 at http dot bugs dot ecos dot sourceware dot org/>
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397
Ilija Kocho <ilijak@siva.com.mk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2183|0 |1
is obsolete| |
Attachment #2185|0 |1
is obsolete| |
--- Comment #54 from Ilija Kocho <ilijak@siva.com.mk> ---
Created attachment 2188
--> http://bugs.ecos.sourceware.org/attachment.cgi?id=2188&action=edit
I2C driver 130420
Mike
Summing up our discussion here I attach the driver with following updates:
- Aggressive clocking is implemented and configurable by:
- CDL (for default setting)
- Macro FREESCALE_I2C_DELAY_CFG(delay, fit, agr) - for individual
devices
- SMB has been removed for the time being
Examples for FREESCALE_I2C_DELAY_CFG:
Following device will look aggressively for 200kHz (5000 [ns])
CYG_I2C_DEVICE(i2c_dev,
&cyg_i2c0_bus,
0x4cu,
0,
FREESCALE_I2C_DELAY_CFG(5000, 0, 1)
);
Following device will look conservatively for 100kHz (10000 [ns])
CYG_I2C_DEVICE(i2c_dev,
&cyg_i2c0_bus,
0x4cu,
0,
FREESCALE_I2C_DELAY_CFG(10000, 0, 0)
);
Which is equivalent to:
CYG_I2C_DEVICE(i2c_dev,
&cyg_i2c0_bus,
0x4cu,
0,
10000
);
(In reply to comment #52)
> > I would like to test default clock speed, meaning the frequency in the CDL.
> > How do I write code that uses the default rather than .i2c_delay. Yes, I am
> > being lazy and not digging into the code.
I took care of this
Now if you enter 0 for delay, the device shall use default value.
Example:
Following device will look conservatively for 100kHz (10000 [ns])
CYG_I2C_DEVICE(i2c_dev,
&cyg_i2c0_bus,
0x4cu,
0,
0
);
Please test this and if you are happy I think I could commit.
Ilija
--
You are receiving this mail because:
You are on the CC list for the bug.