com.sentilla.system
Class DigitalPinDriver

java.lang.Object
  extended by com.sentilla.system.DriverAdapter
      extended by com.sentilla.system.DigitalPinDriver
All Implemented Interfaces:
Driver
Direct Known Subclasses:
DigitalPinDriver

public abstract class DigitalPinDriver
extends DriverAdapter

Create new DigitalPin system objects. "digpin" is used as the default driver name.


Field Summary
 
Fields inherited from class com.sentilla.system.DriverAdapter
m_nextDriver
 
Constructor Summary
DigitalPinDriver()
           
 
Method Summary
static DigitalPin create(int id)
          Create a DigitalPin object representing a specific pin on a microcontrollers.
static DigitalPin create(String driver, int id)
          Create a DigitalPin object representing a specific pin on a microcontrollers.
abstract  DigitalPin newDigitalPin(int id)
          Create a new DigitalPin object with the specified pin id.
 
Methods inherited from class com.sentilla.system.DriverAdapter
getDriverName, getNextDriver, setNextDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigitalPinDriver

public DigitalPinDriver()
Method Detail

newDigitalPin

public abstract DigitalPin newDigitalPin(int id)
Create a new DigitalPin object with the specified pin id. This method must be implemented by all DigitalPin drivers and is called as a helper function by this platform independent (com.sentilla.system) DigitalPinDriver factory.

Parameters:
id - Identity of the digital input/output pin
Returns:
DigitalPin object that represents the specific pin id specified

create

public static DigitalPin create(String driver,
                                int id)
Create a DigitalPin object representing a specific pin on a microcontrollers.

The id of the pin is typically specified in hex by port and then pin number. For example, Port 2, Pin 3, is represented as 0x23.

This factory method should only be used if an alternate DigitalPin platform driver is needed and specified by the driver String paramter.

Parameters:
driver - String representing the driver used to create a DigitalPin
id - Identity of the digital input/output pin
Returns:
DigitalPin object that represents the specific pin id specified
Throws:
IllegalArgumentException - when the given id does not have interrupt capability on the target platform

create

public static DigitalPin create(int id)
Create a DigitalPin object representing a specific pin on a microcontrollers.

The id of the pin is typically specified in hex by port and then pin number. For example, Port 2, Pin 3, is represented as 0x23.

Parameters:
id - Identity of the digital input/output pin
Returns:
DigitalPin object that represents the specific pin id specified
Throws:
IllegalArgumentException - when the given id does not have interrupt capability on the target platform


Copyright © 2007 Sentilla Corporation. All Rights Reserved.