On 05/15/2014 09:58 AM, Marius Liebenberg wrote: > Andy > please have a look at the attached file. I took supply.c and adjusted it > as a basis to start working from. I am trying to get a pin to toggle in > the update function (run_i2c) but it seems to ignore my pleas. Id I can > get this sorted then I have a good start.
I'm not Andy, but the SCL pin toggles for me: > halcmd: loadrt threads > halcmd: loadrt i2c > halcmd: show pin i2c > Component Pins: > Owner Type Dir Value Name > 9 bit OUT TRUE i2c.0.SCL > 9 bit OUT FALSE i2c.0.SDI > 9 bit OUT FALSE i2c.0.SDO > > halcmd: addf i2c.0.update thread1 > halcmd: start > halcmd: show pin > Component Pins: > Owner Type Dir Value Name > 9 bit OUT TRUE i2c.0.SCL > 9 bit OUT FALSE i2c.0.SDI > 9 bit OUT FALSE i2c.0.SDO > > halcmd: show pin > Component Pins: > Owner Type Dir Value Name > 9 bit OUT FALSE i2c.0.SCL > 9 bit OUT FALSE i2c.0.SDI > 9 bit OUT FALSE i2c.0.SDO > > halcmd: show pin > Component Pins: > Owner Type Dir Value Name > 9 bit OUT TRUE i2c.0.SCL > 9 bit OUT FALSE i2c.0.SDI > 9 bit OUT FALSE i2c.0.SDO > > halcmd: Looks good! Some feedback: The tb variable is shared by all instances, you should use *i2c->SCL instead of tb in the run_i2c() function (like in the commented-out code below). Isn't one of the SDI/SDO pins supposed to be an input into the comp? -- Sebastian Kuzminsky ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
