Digi.Drivers.GPIOiMX51 Class Reference

General Purpose Input Output class This class manage the GPIO driver of the ConnecCore 9M/Wi-9M 2443 platforms. More...

Inheritance diagram for Digi.Drivers.GPIOiMX51:

Digi.Drivers.GPIO

List of all members.

Public Types

enum  PullUpDownValue {
  None, Down_100K, Up_100K, Up_22K,
  Up_47K, Keeper
}
 Pull Up/Down Value enumeration Enumeration of the possible resistor-configuration of the gpio. More...
enum  WakeUpValue { Disabled, Enabled }
 WakeUp Value enumeration Enumeration of the possible values of the WakeUp configuration. More...
enum  Port { Port1, Port2, Port3, Port4 }
 Port enumeration Enumeration of the available ports. More...
enum  IrqValue {
  LowLevel, HighLevel, RisingEdge, FallingEdge,
  LowLevel, HighLevel, RisingEdge, FallingEdge,
  Both
}
 Interrupt Value enumeration Enumeration of the possible value of a gpio configured as interrupt. More...
enum  DriveStrengthValue { Normal, Medium, High, Maximum }
 Drive Stregnth enumeration Enumeration of the possible value of Drive Stregnth. More...

Public Member Functions

 GPIOiMX51 (Port PortNumber, uint PinNumber)
 Constructor, need port and pin.
 GPIOiMX51 (Port PortNumber, uint PinNumber, DirectionValue PinDirection)
 Constructor, need port, pin and direction.
 GPIOiMX51 (Port PortNumber, uint PinNumber, DirectionValue PinDirection, IoValue PinValue)
 Constructor, need port, pin, direction and value.
 GPIOiMX51 (Port PortNumber, uint PinNumber, IrqValue IrqMode)
 Constructor, need port and pin and interrupt mode.
 GPIOiMX51 (Port PortNumber, uint PinNumber, PullUpDownValue PullUpDown)
 Constructor, need port, pin and PullUp/Down configuration.
 GPIOiMX51 (Port PortNumber, uint PinNumber, DirectionValue PinDirection, PullUpDownValue PullUpDown)
 Constructor, need port, pin, direction and PullUp/Down configuration.
 GPIOiMX51 (Port PortNumber, uint PinNumber, DirectionValue PinDirection, IoValue PinValue, PullUpDownValue PullUpDown)
 Constructor, need port, pin, direction, value and PullUp/Down configuration.
 GPIOiMX51 (Port PortNumber, uint PinNumber, IrqValue IrqMode, PullUpDownValue PullUpDown)
 Constructor, need port and pin, interrupt mode and PullUp/Down configuration.
override int Wait ()
 Function that wait for the configured interrupt in a gpio configured as interrupt.
override bool Poll (IoValue value, uint tries, int sleep)
 Function that makes a polling of the gpio.
bool Release ()
 Function that releases the gpio.

Properties

override DirectionValue Direction [get, set]
 Get/Set direction property of the gpio (use DirectionValue constants).
GPIOiMX51.IrqValue IrqModeIXM51 [get, set]
 Get/Set interrupt mode property of the gpio (use IrqValue constants).
override GPIO.IrqValue IrqMode [get, set]
 Get/Set interrupt mode property of the gpio (use IrqValue constants).
PullUpDownValue PullUpDown [get, set]
 Get/Set Pull Up/Down property of the gpio (use PullUpDownValue constants).
DriveStrengthValue DriveStrength [get, set]
 Get/Set Drive Strength property of the gpio (use DriveStrengthValue constants).
HysteresisValue Hysteresis [get, set]
 Get/Set Hysteresis property of the gpio (use HysteresisValue constants).
OpenDrainValue OpenDrain [get, set]
 Get/Set Open Drain property of the gpio (use OpenDrainValue constants).
SlewRateValue SlewRate [get, set]
 Get/Set Slew Rate property of the gpio (use SlewRateValue constants).
OutVoltageValue OutVoltage [get, set]
 Get/Set Out Voltage property of the gpio (use OutVoltageValue constants).
InModeValue InMode [get, set]
 Get/Set In Mode property of the gpio (use InModeValue constants).
override bool Block [get, set]
 Get/Set block property of the gpio (use true/false).
override IoValue Value [get, set]
 Get/Set the value of the gpio (use IoValue constants).


Detailed Description

General Purpose Input Output class This class manage the GPIO driver of the ConnecCore 9M/Wi-9M 2443 platforms.


Member Enumeration Documentation

Drive Stregnth enumeration Enumeration of the possible value of Drive Stregnth.

            // Use of the constants
            DriveStregnthValue.Normal
            DriveStregnthValue.Medium
            DriveStregnthValue.High
            DriveStregnthValue.Maximum

Interrupt Value enumeration Enumeration of the possible value of a gpio configured as interrupt.

            // Use of the constants
            IrqValue.LowLevel
            IrqValue.HighLevel
            IrqValue.RisingEdge
            IrqValue.FallingEdge
            IrqValue.Both

Reimplemented from Digi.Drivers.GPIO.

Port enumeration Enumeration of the available ports.

            // Use of the constants
            Port.Port1
            Port.Port2
            Port.Port3
            Port.Port4

Pull Up/Down Value enumeration Enumeration of the possible resistor-configuration of the gpio.

            // Use of the constants
            PullUpDownValue.None
            PullUpDownValue.Down_100K
            PullUpDownValue.Up_100K
            PullUpDownValue.Up_22K
            PullUpDownValue.Up_47K
            PullUpDownValue.Keeper

WakeUp Value enumeration Enumeration of the possible values of the WakeUp configuration.

            // Use of the constants
            WakeUpValue.Disabled
            WakeUpValue.Enabled


Constructor & Destructor Documentation

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber 
)

Constructor, need port and pin.

*/ /**

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
            // define a gpio using port and pin
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
DirectionValue  PinDirection 
)

Constructor, need port, pin and direction.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
PinDirection Direction of the gpio (use DirectionValue constants)
            // define a gpio using port, pin and direction
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11, DirectionValue.Output);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
DirectionValue  PinDirection,
IoValue  PinValue 
)

Constructor, need port, pin, direction and value.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
PinDirection Direction of the gpio (use DirectionValue constants)
PinValue Value of the gpio (use IoValue constants)
            // define a gpio using port, pin, direction and value
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11, DirectionValue.Output, IoValue.Low);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
IrqValue  IrqMode 
)

Constructor, need port and pin and interrupt mode.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
IrqMode Interrupt mode of the gpio (use IrqValue constants)
            // define a gpio using port and pin and interrupt mode
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 14, IrqValue.LowLevel);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
PullUpDownValue  PullUpDown 
)

Constructor, need port, pin and PullUp/Down configuration.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
PullUpDown Pull-up or pull-down configuration of the gpio (use PullUpDownValue constants)
            // define a gpio using port, pin and PullUp/Down configuration
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11, PullUpDownValue.Up);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
DirectionValue  PinDirection,
PullUpDownValue  PullUpDown 
)

Constructor, need port, pin, direction and PullUp/Down configuration.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
PinDirection Direction of the gpio (use DirectionValue constants)
PullUpDown Pull-up or pull-down configuration of the gpio (use PullUpDownValue constants)
            // define a gpio using port, pin, direction and PullUp/Down configuration
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11, DirectionValue.Output, PullUpDownValue.Up);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
DirectionValue  PinDirection,
IoValue  PinValue,
PullUpDownValue  PullUpDown 
)

Constructor, need port, pin, direction, value and PullUp/Down configuration.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
PinDirection Direction of the gpio (use DirectionValue constants)
PinValue Value of the gpio (use IoValue constants)
PullUpDown Pull-up or pull-down configuration of the gpio (use PullUpDownValue constants)
            // define a gpio using port, pin, direction, value and PullUp/Down configuration
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 11, DirectionValue.Output, IoValue.Low, PullUpDownValue.Up);

public Digi::Drivers.GPIOiMX51::GPIOiMX51 ( Port  PortNumber,
uint  PinNumber,
IrqValue  IrqMode,
PullUpDownValue  PullUpDown 
)

Constructor, need port and pin, interrupt mode and PullUp/Down configuration.

Parameters:
PortNumber Port of the gpio (use Port constants)
PinNumber Pin number in the port
IrqMode Interrupt mode of the gpio (use IrqValue constants)
PullUpDown Pull-up or pull-down configuration of the gpio (use PullUpDownValue constants)
            // define a gpio using port and pin, interrupt mode and PullUp/Down configuration
            GPIOIMX51 mygpio = new GPIOIMX51(Port.L, 14, IrqValue.LowLevel, PullUpDownValue.Up);


Member Function Documentation

public override bool Digi::Drivers.GPIOiMX51::Poll ( IoValue  value,
uint  tries,
int  sleep 
) [virtual]

Function that makes a polling of the gpio.

Parameters:
value Input value to be pooled (use IoValue constants)
tries Number of tries to achieve the value
sleep Time to wait between tries
Returns:
true indicates success, false indicates failure
            // Wait for a specific value in the gpio configured as input
            if(mygpio.Poll(IoValue.Low,100,1))
                MessageBox.Show("poll achieved"); 
            else
                MessageBox.Show("poll not achieved");

Implements Digi.Drivers.GPIO.

public bool Digi::Drivers.GPIOiMX51::Release (  ) 

Function that releases the gpio.

Returns:
true indicates success, otherwise indicates failure
            // Release a specific gpio
            mygpio.Release();

public override int Digi::Drivers.GPIOiMX51::Wait (  )  [virtual]

Function that wait for the configured interrupt in a gpio configured as interrupt.

Returns:
true indicates success, false indicates failure
            // Wait for an interrupt configured in a irq gpio
            if(mygpio.Wait())
                MessageBox.Show("Interrupt achieved"); 
            else
                MessageBox.Show("Interrupt not achieved");

Implements Digi.Drivers.GPIO.


Property Documentation

public override bool Digi::Drivers.GPIOiMX51::Block [get, set]

Get/Set block property of the gpio (use true/false).

            //use boolean values (true / false)
            mygpio.Block = true;
            bool Value = mygpio.Block;

Reimplemented from Digi.Drivers.GPIO.

public override DirectionValue Digi::Drivers.GPIOiMX51::Direction [get, set]

Get/Set direction property of the gpio (use DirectionValue constants).

            //use DirectionValue constants (DirectionValue.Input / DirectionValue.Output)
            mygpio.Direction = DirectionValue.Input; 
            DirectionValue Value = mygpio.Direction;

Reimplemented from Digi.Drivers.GPIO.

public DriveStrengthValue Digi::Drivers.GPIOiMX51::DriveStrength [get, set]

Get/Set Drive Strength property of the gpio (use DriveStrengthValue constants).

            //use DriveStrengthValue constants (DriveStrengthValue.High / DriveStrengthValue.Maximum / DriveStrengthValue.Medium / DriveStrengthValue.Norma)
            mygpio.DriveStrength = DriveStrengthValue.High;
            DriveStrengthValue Value = mygpio.DriveStrength;

public OpenDrainValue Digi::Drivers.GPIOiMX51::Hysteresis [get, set]

Get/Set Hysteresis property of the gpio (use HysteresisValue constants).

            //use HysteresisValue constants (HysteresisValue.Enable / HysteresisValue.Disable )
            mygpio.DriveStrength = HysteresisValue.Enable;
            HysteresisValue Value = mygpio.DriveStrength;

InModeValue Digi.Drivers.GPIOiMX51.InMode [get, set]

Get/Set In Mode property of the gpio (use InModeValue constants).

            //use OpenDrainValue constants (InModeValue.CMOS / InModeValue.DDR )
            mygpio.InMode = InModeValue.CMOS;
            InModeValue Value = mygpio.InMode;

public override IrqValue Digi::Drivers.GPIOiMX51::IrqMode [get, set]

Get/Set interrupt mode property of the gpio (use IrqValue constants).

            //use IrqValue constants (IrqValue.LowLevel / IrqValue.HighLevel / IrqValue.FallingEdge / IrqValue.RisingEdge)
            mygpio.IrqMode = GPIO.IrqValue.LowLevel;
            GPIO.IrqValue Value = mygpio.IrqMode;

Reimplemented from Digi.Drivers.GPIO.

public GPIOIMX51 IrqValue Digi::Drivers.GPIOiMX51::IrqModeIXM51 [get, set]

Get/Set interrupt mode property of the gpio (use IrqValue constants).

            //use IrqValue constants (IrqValue.LowLevel / IrqValue.HighLevel / IrqValue.FallingEdge / IrqValue.RisingEdge / IrqValue.Both)
            mygpio.IrqModeIXM51 = GPIOIMX51.IrqValue.LowLevel;
            GPIOIMX51.IrqValue Value = mygpio.IrqModeIXM51;

OpenDrainValue Digi.Drivers.GPIOiMX51.OpenDrain [get, set]

Get/Set Open Drain property of the gpio (use OpenDrainValue constants).

            //use OpenDrainValue constants (OpenDrainValue.Enable / OpenDrainValue.Disable )
            mygpio.OpenDrain = OpenDrainValue.Enable;
            OpenDrainValue Value = mygpio.OpenDrain;

public InModeValue Digi::Drivers.GPIOiMX51::OutVoltage [get, set]

Get/Set Out Voltage property of the gpio (use OutVoltageValue constants).

            //use OpenDrainValue constants (OutVoltageValue.High / OutVoltageValue.Low )
            mygpio.OutVoltage = OutVoltageValue.Enable;
            OutVoltageValue Value = mygpio.OutVoltage;

public PullUpDownValue Digi::Drivers.GPIOiMX51::PullUpDown [get, set]

Get/Set Pull Up/Down property of the gpio (use PullUpDownValue constants).

            //use PullUpDownValue constants (PullUpDownValue.Down / PullUpDownValue.Up / PullUpDownValue.None)
            mygpio.PullUpDown = PullUpDownValue.Down;
            PullUpDownValue Value = mygpio.PullUpDown;

public SlewRateValue Digi::Drivers.GPIOiMX51::SlewRate [get, set]

Get/Set Slew Rate property of the gpio (use SlewRateValue constants).

            //use OpenDrainValue constants (SlewRateValue.Fast / SlewRateValue.Slow )
            mygpio.SlewRate = SlewRateValue.Enable;
            SlewRateValue Value = mygpio.SlewRate;

public override IoValue Digi::Drivers.GPIOiMX51::Value [get, set]

Get/Set the value of the gpio (use IoValue constants).

            //use IoValue constants (IoValue.High / IoValue.Low)
            mygpio.Value = IoValue.High;
            IoValue Value = mygpio.Value;

Reimplemented from Digi.Drivers.GPIO.


The documentation for this class was generated from the following file:

Generated on Fri Oct 16 19:28:05 2009 by  doxygen 1.5.9