On Dec 2, 2008, at 2:48 PM, Hiroshi Ito wrote:
+static void output_data(void) +{ + int i; + *gpio_data_register = output_value ^ INVERT_BITS; + for ( i = 0; i < 10; i++ ) + ; }
A for loop like that can't reliably be used as a delay loop. First, the speed of the loop is non-deterministic since it depends entirely on the speed of the host CPU and its ability to execute loops efficiently. Second, at any optimization level a compiler is likely to remove the for since it has no semantic effect. Is a specific amount of time delay necessary? Can the device be polled instead?
-- Rick Altherr [EMAIL PROTECTED]"He said he hadn't had a byte in three days. I had a short, so I split it with him."
-- Unsigned
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development