linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Definitions for c_cflag etc. in termbits.h???
@ 2003-01-10 15:09 Steven Scholz
  2003-01-10 15:19 ` Marius Groeger
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Steven Scholz @ 2003-01-10 15:09 UTC (permalink / raw)
  To: LinuxPPC


Hi there,

I am playing around with UARTs and got completly confused when looking at
./include/asm-ppc/termbits.h:

E.g. the DEFINEs of c_iflags appear to me as decimal values!?

/* c_iflag bits */
#define IGNBRK  0000001
#define BRKINT  0000002
#define IGNPAR  0000004
#define PARMRK  0000010
#define INPCK   0000020
#define ISTRIP  0000040
#define INLCR   0000100
#define IGNCR   0000200
#define ICRNL   0000400
#define IXON    0001000
#define IXOFF   0002000
#define IXANY   0004000
#define IUCLC   0010000
#define IMAXBEL 0020000

So how could code like

./arch/ppc/8xx_io/uart.c:       if (I_BRKINT(info->tty) || I_PARMRK(info->tty))
or
./arch/ppc/8xx_io/uart.c:#define RELEVANT_IFLAG(iflag) (iflag &
(IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))

possibly work?

Shouldn't that be hex values as in ./include/asm-sparc64/termbits.h:

/* c_iflag bits */
#define IGNBRK  0x00000001
#define BRKINT  0x00000002
#define IGNPAR  0x00000004
#define PARMRK  0x00000008
#define INPCK   0x00000010
#define ISTRIP  0x00000020
#define INLCR   0x00000040
#define IGNCR   0x00000080
etc. ???

Thanks,

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Definitions for c_cflag etc. in termbits.h???
@ 2003-01-10 15:18 Milliorn Gary-rxcr80
  2003-01-10 15:33 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Milliorn Gary-rxcr80 @ 2003-01-10 15:18 UTC (permalink / raw)
  To: LinuxPPC

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]



> -----Original Message-----
> From: Steven Scholz [mailto:steven.scholz@imc-berlin.de]
> Sent: Friday, January 10, 2003 9:10 AM
> To: LinuxPPC
> Subject: Definitions for c_cflag etc. in termbits.h???
>
>
>
> Hi there,
>
> I am playing around with UARTs and got completly confused
> when looking at
> ./include/asm-ppc/termbits.h:
>
> E.g. the DEFINEs of c_iflags appear to me as decimal values!?
>
> /* c_iflag bits */
> #define IGNBRK  0000001
> #define BRKINT  0000002
> #define IGNPAR  0000004
> #define PARMRK  0000010


It's octal, and the values are the same.  Octal 10 = Hex 8.
As to why octal, I couldn't hazard a guess...



> #define INPCK   0000020
> #define ISTRIP  0000040
> #define INLCR   0000100
> #define IGNCR   0000200
> #define ICRNL   0000400
> #define IXON    0001000
> #define IXOFF   0002000
> #define IXANY   0004000
> #define IUCLC   0010000
> #define IMAXBEL 0020000
>
> So how could code like
>
> ./arch/ppc/8xx_io/uart.c:       if (I_BRKINT(info->tty) ||
> I_PARMRK(info->tty))
> or
> ./arch/ppc/8xx_io/uart.c:#define RELEVANT_IFLAG(iflag) (iflag &
> (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
>
> possibly work?
>
> Shouldn't that be hex values as in ./include/asm-sparc64/termbits.h:
>
> /* c_iflag bits */
> #define IGNBRK  0x00000001
> #define BRKINT  0x00000002
> #define IGNPAR  0x00000004
> #define PARMRK  0x00000008
> #define INPCK   0x00000010
> #define ISTRIP  0x00000020
> #define INLCR   0x00000040
> #define IGNCR   0x00000080
> etc. ???
>
> Thanks,
>
> Steven
>


[-- Attachment #2: Gary Milliorn (E-mail).vcf --]
[-- Type: application/octet-stream, Size: 444 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Milliorn;Gary
FN:Milliorn Gary-rxcr80
ORG:10060985;SD646
TEL;WORK;VOICE:5129667066
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;TX32/PL44;MOTOROLA INC.=0D=0A7700 W. PARMER LANE;AUSTIN;TEXAS;78729;UNITED =
STATES
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:TX32/PL44=0D=0AMOTOROLA INC.=0D=0A7700 W. PARMER LANE=0D=0AAUSTIN, TEXAS 787=
29=0D=0AUNITED STATES
EMAIL;PREF;INTERNET:Gary.Milliorn@motorola.com
REV:20021104T215429Z
END:VCARD

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Definitions for c_cflag etc. in termbits.h???
  2003-01-10 15:09 Steven Scholz
@ 2003-01-10 15:19 ` Marius Groeger
  2003-01-10 15:25 ` Wolfgang Denk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Marius Groeger @ 2003-01-10 15:19 UTC (permalink / raw)
  To: Steven Scholz; +Cc: LinuxPPC


On Fri, 10 Jan 2003, Steven Scholz wrote:

> ./include/asm-ppc/termbits.h:
>
> E.g. the DEFINEs of c_iflags appear to me as decimal values!?
>
> /* c_iflag bits */
> #define IGNBRK  0000001

It's octal (note the leading zero).

Regards,
Marius

-----------------------------------------------------------------------------
Marius Groeger           SYSGO Real-Time Solutions AG       mgroeger@sysgo.de
Software Engineering     Embedded and Real-Time Software    www.sysgo.de
Voice: +49-6136-9948-0   Am Pfaffenstein 14                 www.osek.de
FAX:   +49-6136-9948-10  55270 Klein-Winternheim, Germany   www.elinos.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Definitions for c_cflag etc. in termbits.h???
  2003-01-10 15:09 Steven Scholz
  2003-01-10 15:19 ` Marius Groeger
@ 2003-01-10 15:25 ` Wolfgang Denk
  2003-01-10 15:27 ` Steven Scholz
  2003-01-10 16:25 ` "David Müller (ELSOFT AG)"
  3 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2003-01-10 15:25 UTC (permalink / raw)
  To: Steven Scholz; +Cc: LinuxPPC


Hi Steven,

in message <3E1EE23F.5BC310F3@imc-berlin.de> you wrote:
>
> E.g. the DEFINEs of c_iflags appear to me as decimal values!?
>
> /* c_iflag bits */
> #define IGNBRK  0000001
> #define BRKINT  0000002
> #define IGNPAR  0000004
> #define PARMRK  0000010
> #define INPCK   0000020
> #define ISTRIP  0000040
> #define INLCR   0000100
> #define IGNCR   0000200
> #define ICRNL   0000400
> #define IXON    0001000
> #define IXOFF   0002000
> #define IXANY   0004000
> #define IUCLC   0010000
> #define IMAXBEL 0020000

No, these are octal values, of course.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Definitions for c_cflag etc. in termbits.h???
  2003-01-10 15:09 Steven Scholz
  2003-01-10 15:19 ` Marius Groeger
  2003-01-10 15:25 ` Wolfgang Denk
@ 2003-01-10 15:27 ` Steven Scholz
  2003-01-10 16:25 ` "David Müller (ELSOFT AG)"
  3 siblings, 0 replies; 7+ messages in thread
From: Steven Scholz @ 2003-01-10 15:27 UTC (permalink / raw)
  To: LinuxPPC


Steven Scholz wrote:
>
> Hi there,
>
> I am playing around with UARTs and got completly confused when looking at
> ./include/asm-ppc/termbits.h:
>
> E.g. the DEFINEs of c_iflags appear to me as decimal values!?
>
> /* c_iflag bits */
> #define IGNBRK  0000001

Thanks to you all!

Of course it's octal.

It's friday! Sorry for the noise!

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Definitions for c_cflag etc. in termbits.h???
  2003-01-10 15:18 Definitions for c_cflag etc. in termbits.h??? Milliorn Gary-rxcr80
@ 2003-01-10 15:33 ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2003-01-10 15:33 UTC (permalink / raw)
  To: Milliorn Gary-rxcr80; +Cc: LinuxPPC


In message <5725AF6EE9FAD51195DC009027E3770201266556@az33exm35.corp.mot.com> you wrote:
>
> As to why octal, I couldn't hazard a guess...

Most of the original Unix code used octal constants. They were pretty
popular on the PDP computers...

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
"Most people would like to be delivered  from  temptation  but  would
like it to keep in touch."                             - Robert Orben

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Definitions for c_cflag etc. in termbits.h???
  2003-01-10 15:09 Steven Scholz
                   ` (2 preceding siblings ...)
  2003-01-10 15:27 ` Steven Scholz
@ 2003-01-10 16:25 ` "David Müller (ELSOFT AG)"
  3 siblings, 0 replies; 7+ messages in thread
From: "David Müller (ELSOFT AG)" @ 2003-01-10 16:25 UTC (permalink / raw)
  To: LinuxPPC


Hi

Steven Scholz wrote:
> Hi there,
>
> I am playing around with UARTs and got completly confused when looking at
> ./include/asm-ppc/termbits.h:

That reminds me of something:


Is it possible that "CMSPAR" is missing in both the 2.4 and 2.5 version
of asm-ppc/termbits.h?


Dave


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-10 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 15:18 Definitions for c_cflag etc. in termbits.h??? Milliorn Gary-rxcr80
2003-01-10 15:33 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-01-10 15:09 Steven Scholz
2003-01-10 15:19 ` Marius Groeger
2003-01-10 15:25 ` Wolfgang Denk
2003-01-10 15:27 ` Steven Scholz
2003-01-10 16:25 ` "David Müller (ELSOFT AG)"

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).