From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodolfo Giometti Date: Mon, 14 May 2007 08:35:07 +0200 Subject: [U-Boot-Users] PXA27x usbtty start up sequence In-Reply-To: <20070513132536.6ab397df@localhost.localdomain> References: <20070512231906.GG11070@enneenne.com> <20070513132536.6ab397df@localhost.localdomain> Message-ID: <20070514063506.GD7571@enneenne.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, May 13, 2007 at 01:25:36PM +0100, Bryan O'Donoghue wrote: > > Hmm, you might want to change > > unsigned int len = 0; > while(len > 0) { > usbtty_poll(); > > space = maxlen - usbtty_output.size; > if(space){ > /* Do stuff */ > } > } > > to > > > /* Not tested */ > unsigned int len = 0; > while(len > 0) { > usbtty_poll(); > > /* Do stuff */ > } > > in __usbtty_puts() Ok, I'll test it. This should remove the problem that the system doesn't boot if no connected? > puts() I guess _should_ be a 'best effort'. Better, still, maybe > we could add an environment variable which would switch puts() > between flow-control and 'best effort', so that people have the > choice. > > /* Not tested */ > unsigned int len = 0; > while(len > 0) { > usbtty_poll(); > space = maxlen; > > if(environment_variable_use_tty_flow_control) > space = maxlen - usbtty_output.size; > > if(space){ > /* Do stuff */ > } > } If I set environment_variable_use_tty_flow_control to "no", how I can restore it to "yes"? Thanks, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127