The blocks in the LPC1768/LPC2368 that implement the I2C, alas, do not give you access to check the SCL line. It hides all of this from you with a state machine (which is one reason we provide the I2C interface we do currently). They do, however, support clock stretching.
You could use a third line as an input, to sample the clock line yourself (much like the example I used to get the Mindstorm sensor working, which I turned into an output to override the clock line):
http://mbed.org/forum/mbed/topic/804/?page=1#comment-3944
We are looking at a finer grained byte level control for the I2C in addition to the existing interface, but this still won't let you control the clock line, I am afraid.
Are the lower-level routines which the class i2c. is built available?
I'm building a peripheral slave device around a Microchip PIC 18F microcontroller chip. I need finer control than just i2c.read and i2c.write. In particular I am dealing with SCL clock-stretching while the slave gathers up and formats a slave response. I would like to be able to poll the SCL line and determine when the slave is ready to send back a data packet.
Doug