LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C# reverse output? (https://www.linuxquestions.org/questions/programming-9/c-reverse-output-445328/)

itz2000 05-16-2006 08:49 AM

C# reverse output?
 
hello,
if I've done

Code:

PortAccess.Output(888, 0x1);
or
Code:

PortAccess.Output(888, 0x2);
and I want to verify what I've done, so how can I check, what was outputted at the last time to port 888?


Thanks!

acid_kewpie 05-17-2006 02:25 AM

i'm am not familiar with port programming under c# but i'd be fairly sure that this is impossible. it's your own responsibility to track this kind of data, maybe using a history buffer to hold old outputs. indeed you might want to factor out the writing and buffering to a seperate function, so your main body of code just calls a function with a single value, or writes to a buffer and a dedicated function handles it all.

itz2000 05-17-2006 10:31 AM

Quote:

Originally Posted by acid_kewpie
i'm am not familiar with port programming under c# but i'd be fairly sure that this is impossible. it's your own responsibility to track this kind of data, maybe using a history buffer to hold old outputs. indeed you might want to factor out the writing and buffering to a seperate function, so your main body of code just calls a function with a single value, or writes to a buffer and a dedicated function handles it all.

yes.
re thought about it, the solution is to get a variable changed whenever output has changed, so the variable will hold the last output.


Thanks anyways!


All times are GMT -5. The time now is 04:19 AM.