Re: What is the equivalent of REG32 type in C#?



Hi,

This is the first thing that I could think of :). The application that
I am working on is a C# managed app and the device has inputs that
would trigger some events. I need to gather and display the new
information on my application. If you could point me to some easier
ways of doing what I need to do, I would be more than happy to try it
out.:) Thanks.

-- mario


Paul G. Tobey [eMVP] wrote:
Why do you want to do this? What possible advantage would you have in
handling interrupts in managed code?

Paul T.

"Mario" <alphatommy@xxxxxxxxxxx> wrote in message
news:1157574192.573887.222880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I am lost here too, however I was thinking that it might be possible to
implement a call back from the IST in the driver to managed code. The
complete sequence would be something like this:

1. Hardware generates an interrupt.
2. Triggers ISR, and kernel (scheduler) services IST in the driver.
3. IST makes a call back to maged code(IST2).
4. IST2 does what it does and return to IST.
5. IST ends by calling InterruptDone().

The normal sequence of interrupt events are described in
http://www.windowsfordevices.com/articles/AT8134605131.html.


The thing that I am concerned about is that this might be possible, but
it takes too long to service all the way to the managed code. Then
again, I might be off track. Any inputs are appreciated.

For those who have done this kind of stuff, are ISTs ever done at the
managed code level or just in the driver level? If it has not bee
done, what schemes are being used so that a push of a button can
trigger my application to send information to my managed code app?
Thanks.

- mario




Paul G. Tobey [eMVP] wrote:
It's *not* a structure, but a macro. You'll have to figure out how it's
defined by the driver you're trying to replace and do the same in C#.
There's no right answer to your question, but different answers for every
driver.

Now, on to the real question: how are you going to get the event handle
to
wait on so that you can implement the IST in managed code?

Paul T.

"Mario" <alphatommy@xxxxxxxxxxx> wrote in message
news:1157563387.648155.38170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Paul,

I am going through the driver source code to see how can I create an
IST for GPIO from a managed project. There are few places in the
driver where varibles are defined using REG32, for example there is a
structure for the port registers where all elements of the structure
are defined by using REG32(for pin direction it has REG32 DDIR). I was
thinking that I might need to translate the structure to C# and need to
know what is the appropriate type for it. Thanks.

-- mario

Paul G. Tobey [eMVP] wrote:
That's not a type, as far as I know. It appears to me to be a macro
in
C,
but it's defined differently depending on the context (one driver
likes
it
this way; another a different way). How are you expecting to use it
and
why
do you think you need it?

Paul T.

"Mario" <alphatommy@xxxxxxxxxxx> wrote in message
news:1157499700.862709.309500@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Is there a matching equivalent for REG32 type in C#?


Thanks.




.