From: Wolfgang Denk Date: Mon, 28 Mar 2011 20:18:28 +0200 Subject: [U-Boot] Support for reading GPIO's in boot scripts? In-Reply-To: References: <4D904D5E.8070303@dawes.za.net> Message-ID: <20110328181828.3484DE7AFE2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Charles Krinke, In message you wrote: > > Let me add my $.02. I have a request to be able to boot a USB drive. So, > reading a GPIO pin and making a decision in a script is a desirable thing. > Certainly a 'MD 0x12345678' can read a pin but then making a decision in an > environment string chain would help. Can we do this? Sure we can do this. It's as trivial as for example setexpr tmpvar *12345678.l "&" 00010000 if itest ${tmpvar} != 0; then do something ; fi Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de History is only a confused heap of facts. -- Philip Earl of Chesterfield