avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #10154] Update to serial code management for custom connection pa


From: Dawid Buchwald
Subject: [patch #10154] Update to serial code management for custom connection parameters
Date: Sat, 4 Dec 2021 08:14:03 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36

Follow-up Comment #3, patch #10154 (project avrdude):

[comment #1 comment #1:]
> I wonder whether we could get around those
> 
> pinfo.serialinfo.cflags = SERIAL_DEFAULT_FLAGS;
> 
> everywhere.
> 

Well, not really, the point is to explicitly state what do we want. Depending
on where in memory the variable is defined and how it gets (or doesn't)
initialised is not very safe, and safety I was going for, even if at the cost
of verbosity.

> Couldn't we just leave that as 0 (implied by zeroing out the pgm struct
initially), and then, in the serial drivers, handle 0 as the classic "raw"
mode flags ("8N1")?

If you do use some mechanism to ensure that the default value will always be
0, then sure. Thing is, AFAIK, without proper constructor you can guarantee
that.

> 
> What alternate cflags settings does SerialUPDI require?
> 

Even parity enabled, two stop bits.

> wAVR also wants to make the timeouts more flexible (since network timeouts
can easily exceed 100 ms), maybe we need a kind of architectural overhaul for
all of this.

That is also something that could be considered. I was looking for correct
(and safe!) method that would have as little impact on the code as possible.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10154>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]