|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cork.util.CorkRuntime
Runtime methods for use by the entire Cork library. There will only be one instance of CorkRuntime per VM.
Field Summary | |
static java.lang.String |
RUNTIME_PROPERTY_DEBUG
The system property that puts teh cork library in debug mode. |
static int |
SYSTEM_UNHANDLED_EXCEPTION_PATTERN
The blink pattern to use when the signalUnhandledException() method is called. |
Method Summary | |
static boolean |
capturePin(Device device,
com.ajile.drivers.gpio.GpioPin pin)
Captures a GPIO pin for use by a particular class. |
static boolean |
getDebugMode()
Checks to see if the system is in debug mode. |
static java.util.Vector |
getOwnedPins(Device device)
Gets all the pins owned by a particular device. |
static Device |
getPinOwner(com.ajile.drivers.gpio.GpioPin pin)
Finds the owner of a captured pin. |
static boolean |
isCaptured(com.ajile.drivers.gpio.GpioPin pin)
Tests if a GPIO pin has been catured. |
static boolean |
releaseAllPins(Device device)
Releases all pins captured by the specified device. |
static boolean |
releasePin(Device device,
com.ajile.drivers.gpio.GpioPin pin)
Releases a pin captured with the capturePin() method. |
static void |
signalException(int pattern)
Use this method to signal an exception by blinking the power LED on the JStamp module. |
static void |
signalUnhandledException(java.lang.Throwable t)
This method can be entered into the "Uncaught Exception" field of the JemBuilder project (JVM0|Main property sheet). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SYSTEM_UNHANDLED_EXCEPTION_PATTERN
public static final java.lang.String RUNTIME_PROPERTY_DEBUG
Method Detail |
public static final void signalException(int pattern)
The pattern of blinks will be the number of blinks specified followed by a 1.5 second pause. this will repeat until another exception is signaled, or the processor is reset. Multiple exceptions can be signaled by calling this method with a different pattern number. e.g. the default for a system unhandled exception is 1000 blinks followed by a 1.5 second pause. Currently this only works for the aj80 chip. It will work for the aj100 when someone checks to see if the parameters need to change, or writes a new version of the method.
WARNING: The PIO A pins of the JStamp will "blink" with the power LED.
pattern
- int the number of blinks to signal for this exception.public static final void signalUnhandledException(java.lang.Throwable t)
t
- Throwable the throwable exception. The exception will be ignored,
it is specified to conform to the limitations set by JemBuilder on teh
name of the method.public static final boolean capturePin(Device device, com.ajile.drivers.gpio.GpioPin pin)
device
- The Device wishing to capture the specified GPIO pin.pin
- GPIO pin to capture.public static final boolean releasePin(Device device, com.ajile.drivers.gpio.GpioPin pin)
device
- The Device wishing to release the specified GPIO pin.pin
- GPIO pin to release.public static final boolean releaseAllPins(Device device)
device
- The Device wishing to release all of it's captured GPIO pin.public static final boolean getDebugMode()
public static final boolean isCaptured(com.ajile.drivers.gpio.GpioPin pin)
pin
- The pin to test.public static final Device getPinOwner(com.ajile.drivers.gpio.GpioPin pin)
pin
- The pin in question.public static final java.util.Vector getOwnedPins(Device device)
device
- the device who's pins we want to get.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |