Click here to Skip to main content
15,923,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Erudite_Eric17-Feb-12 6:10
Erudite_Eric17-Feb-12 6:10 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson17-Feb-12 21:13
Andrew Pearson17-Feb-12 21:13 
SuggestionRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Jochen Arndt17-Feb-12 22:58
professionalJochen Arndt17-Feb-12 22:58 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson21-Feb-12 13:04
Andrew Pearson21-Feb-12 13:04 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Jochen Arndt21-Feb-12 21:46
professionalJochen Arndt21-Feb-12 21:46 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson22-Feb-12 11:35
Andrew Pearson22-Feb-12 11:35 
AnswerRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Erudite_Eric16-Feb-12 20:20
Erudite_Eric16-Feb-12 20:20 
GeneralRe: Setting Parity Bit (serial port) not working. Q for the driver guru's. Pin
Andrew Pearson17-Feb-12 21:30
Andrew Pearson17-Feb-12 21:30 
I am looking at the code from the latest DDK, but not sure if its WDF. I dont know a whole lot about MS drivers (although I am about to learn!). I am just referring to the sample. I have not looked in great detail yet, still feeling my way through it.

I actually disabled FIFO, I know that the code worked, because if I wrote 5 bytes to the port, only the last byte was transmitted! However, as before it never worked, and I should have realised that doing this provided yet another clue as the what was happening. When using WriteFile without overlapped, it is supposed to block until its completed, which I am sure it does. But what does completed mean?? Judging by the observations I made, and after thinking about it a little more, it obviously blocks until the data is written to the driver, not the UART! So I am guessing that the driver buffers what you write to it, and waits for an interrupt before writing the data to the UART, or something along those lines. On Monday, I shall be looking back at the driver code again!

So what I know now is:
Setting parity is immediate.
Transmitting the data is not immediate.

I also tried IOCTL_SERIAL_IMMEDIATE_CHAR command with no luck. I have since talked to another developer who has had the same issue. He gave me a tip late friday which I will try on monday.

I am using my own app to determine the value of the parity, setting space parity and using IOCTL_SERIAL_LSRMST_INSERT to get parity errors. This works really well actually. I was questioning weather there was a bug in this code too, but I came to the conclusion that it was fine after testing it against the hardware that uses this protocol. Was almost going to put the cro on it for my own sanity.

BTW, will be posting this project on code project once its all working ok.
QuestionProblem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 14:41
john john mackey16-Feb-12 14:41 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Richard Andrew x6416-Feb-12 16:09
professionalRichard Andrew x6416-Feb-12 16:09 
GeneralRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 19:38
john john mackey16-Feb-12 19:38 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Chuck O'Toole16-Feb-12 17:29
Chuck O'Toole16-Feb-12 17:29 
AnswerRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
Chuck O'Toole16-Feb-12 17:32
Chuck O'Toole16-Feb-12 17:32 
GeneralRe: Problem with qsort() on CArray(ptr *, ptr *) Pin
john john mackey16-Feb-12 19:44
john john mackey16-Feb-12 19:44 
QuestionWebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 10:30
Fred Ackers16-Feb-12 10:30 
AnswerRe: WebSockets in native C++ (not managed) Pin
enhzflep16-Feb-12 17:53
enhzflep16-Feb-12 17:53 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 19:31
Fred Ackers16-Feb-12 19:31 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep16-Feb-12 23:57
enhzflep16-Feb-12 23:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers19-Feb-12 6:57
Fred Ackers19-Feb-12 6:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep19-Feb-12 12:19
enhzflep19-Feb-12 12:19 
QuestionSending message between objects Pin
aangerma16-Feb-12 9:16
aangerma16-Feb-12 9:16 
QuestionRe: Sending message between objects Pin
David Crow16-Feb-12 10:54
David Crow16-Feb-12 10:54 
AnswerRe: Sending message between objects Pin
aangerma16-Feb-12 19:42
aangerma16-Feb-12 19:42 
AnswerRe: Sending message between objects Pin
Albert Holguin16-Feb-12 18:15
professionalAlbert Holguin16-Feb-12 18:15 
AnswerRe: Sending message between objects Pin
enhzflep16-Feb-12 18:19
enhzflep16-Feb-12 18:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.