This project is read-only.

How to use IOPorts in COSMOS

Apr 17, 2012 at 6:38 PM

Hi Guys,

I am doing some very grubby low level driver work at the moment but I don't get how the use the IOPorts in COSMOS. If someone could explain how they work and if i'm doing what I do below wrong.

All I know is how to make them and i'm not even sure if thats right so here goes.

protected Cosmos.Core.IOPort port;
byte portBar = 0;
port = new Cosmos.Core.IOPort(0x13, portBar);

Any help much appreciated.

Thanks,

melikescheese

Apr 17, 2012 at 7:42 PM
melikesPCcheese wrote:

Hi Guys,

I am doing some very grubby low level driver work at the moment but I don't get how the use the IOPorts in COSMOS. If someone could explain how they work and if i'm doing what I do below wrong.

All I know is how to make them and i'm not even sure if thats right so here goes.

 

protected Cosmos.Core.IOPort port;
byte portBar = 0;
port = new Cosmos.Core.IOPort(0x13, portBar);

 

Any help much appreciated.

Thanks,

melikescheese

Use them like this:

Cosmos.Core.IOPort port = new Cosmos.Core.IOPort(0x13);

Then to write do port.byte = portBar;

Then to read do something = port.byte;

 

Hope it helps - Matt