linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Ramya Desai <ramya.desai@gmail.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: (No subject header)
Date: Tue, 09 Nov 2010 10:56:48 -0600	[thread overview]
Message-ID: <1289321808_14292@mail4.comsite.net> (raw)
In-Reply-To: <AANLkTimPOAN2JSiYEQJ7VOQxVStzFxpStngZD2kepf7J@mail.gmail.com>


On Tue Nov 09 2010 around 02:27:38 EST, Ramya Desai wrote:
> I did not understand the CRTSCTS preprocessor macro which is defined
> in termbits.h file.
..
> As per the typedefs defined in the beginning of the file, the c_cflag
> is unsigned int member in the struct termios structure. The CRTSCTS is
> defined in the file as a 48 bit value.
> 
> #define CRTSCTS 020000000000 /* flow control */

That is not a 48 bit value.

> 
> I saw the following snippet in one of the serial applications.
> 
> struct termios newtio;
> newtio.c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
> 
> My question is, the c_cflag is a 32 bit value member and the CRTSCTS
> is a 48 bit value. How CRTSCTS is accommodates into c_cflag variable?
> Please let me know, if my interpretation is wrong.
> 
> Thanks in advance.

Hint: constants in C may be expressed in base 16, 10, or 8.

milton

  reply	other threads:[~2010-11-09 16:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09  7:27 Doubt about CRTSCTS preprocessor macro definition in termbits.h file Ramya Desai
2010-11-09 16:56 ` Milton Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-26 20:52 (No subject header) gina
2010-11-30 20:01 [PATCH 3/4] exec: unify compat_do_execve() code Oleg Nesterov
2010-12-01 17:37 ` (No subject header) Milton Miller
2010-12-01 18:27   ` Oleg Nesterov
2010-05-27  2:42 [PATCH 5/8] sched: clarify commment for TS_POLLING Len Brown
2010-05-27  2:42 ` idle-test patches queued for upstream Len Brown
2010-05-27  2:42   ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
2010-05-27  5:25     ` (No subject header) Milton Miller
2010-05-27  5:47       ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289321808_14292@mail4.comsite.net \
    --to=miltonm@bga.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramya.desai@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).