Article View: borland.public.cppbuilder.nativeapi
Article #6249Re: How can i set the Parity Bit to 0 or 1 as i want ?
From: Ramy
Date: Mon, 30 May 2005 07:13
Date: Mon, 30 May 2005 07:13
32 lines
1934 bytes
1934 bytes
But you did not answer my question - Please show me one code for setting the parity bit to '1', and another code for setting the parity bit to '0', thanks. Ramy Bob Gonder <notbg@notmindspring.invalid> wrote: >Ramy wrote: > >>Hi, down below is the function that i use to initiate my com port, >>for some messages i need to set the Parity Bit to '1', and for >>other messages i need to reset this bit to '0', how do i do that? > >Usual setting is NoParity, which is what you have set. >Change the value to Even, Odd, Mark or Space as you require. > >> my_DCB.Parity = NOPARITY; // 0-4=no,odd,even,mark,space > >#define NOPARITY 0 >#define ODDPARITY 1 >#define EVENPARITY 2 >#define MARKPARITY 3 >#define SPACEPARITY 4 > >> strcat( com_params, ":9600, N, 8, 1" ); // Prepare COM Parameters > >Change the N to the proper value. >Not 100% sure about m and s, but probably N, O, E, M, S
Technical Details
Message-ID:
<429abd09$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4299b415$1@newsgroups.borland.com> <79sj91p7a1ob3jrc8ih4id3u2fdjpm7u4v@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cb603903b4ecd1d3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ramy" <Ramy@NoMail.com> Sender: "Ramy" <Ramy@NoMail.com> Reply-To: "Ramy" <Ramy@NoMail.com> Subject: Re: How can i set the Parity Bit to 0 or 1 as i want ? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.0.27.159 References: <4299b415$1@newsgroups.borland.com> <79sj91p7a1ob3jrc8ih4id3u2fdjpm7u4v@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <429abd09$1@newsgroups.borland.com> Date: 30 May 2005 00:13:13 -0700 X-Trace: newsgroups.borland.com 1117437193 207.105.83.66 (30 May 2005 00:13:13 -0700) Lines: 33 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail