Article View: borland.public.cppbuilder.nativeapi
Article #6246Re: How can i set the Parity Bit to 0 or 1 as i want ?
From: Bob Gonder
Date: Sun, 29 May 2005 17:00
Date: Sun, 29 May 2005 17:00
21 lines
1796 bytes
1796 bytes
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:
<79sj91p7a1ob3jrc8ih4id3u2fdjpm7u4v@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tsicnews.teliasonera.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4299b415$1@newsgroups.borland.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: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How can i set the Parity Bit to 0 or 1 as i want ? Date: Sun, 29 May 2005 10:00:28 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <79sj91p7a1ob3jrc8ih4id3u2fdjpm7u4v@4ax.com> References: <4299b415$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.201.127 X-Trace: newsgroups.borland.com 1117386025 67.77.201.127 (29 May 2005 10:00:25 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tsicnews.teliasonera.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail