changeset 162:6569ed57740f

8080276: Unused MMIODevice classes Summary: src/se/jdk folder Reviewed-by: alkonsta
author snazarki
date Wed, 13 May 2015 14:55:29 +0300
parents 1b2e8cfd44d1
children f8fd28c56300
files src/se/classes/jdk/dio/mmio/AccessOutOfBoundsException.java src/se/classes/jdk/dio/mmio/MMIODevice.java src/se/classes/jdk/dio/mmio/MMIODeviceConfig.java src/se/classes/jdk/dio/mmio/MMIOEvent.java src/se/classes/jdk/dio/mmio/MMIOEventListener.java src/se/classes/jdk/dio/mmio/MMIOPermission.java src/se/classes/jdk/dio/mmio/RawBlock.java src/se/classes/jdk/dio/mmio/RawMemory.java src/se/classes/jdk/dio/mmio/RawRegister.java src/se/classes/jdk/dio/mmio/package-info.java src/share/classes/jdk/dio/dac/DACChannelConfig.java src/share/classes/jdk/dio/gpio/GPIOPinConfig.java src/share/classes/jdk/dio/pwm/PWMChannelConfig.java
diffstat 13 files changed, 3 insertions(+), 1685 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/classes/jdk/dio/mmio/AccessOutOfBoundsException.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-/**
- * Thrown by an instance of {@link MMIODevice} if an offset used is out of valid boundary of the specified memory block.
- *
- * @since 1.0
- */
-@SuppressWarnings("serial")
-@apimarker.API("device-io_1.0")
-public class AccessOutOfBoundsException extends RuntimeException {
-
-    /**
-     * Constructs a new {@code AccessOutOfBoundsException} with {@code null} as its detailed reason message.
-     */
-    public AccessOutOfBoundsException() {
-        super();
-    }
-
-    /**
-     * Constructs a new {@code AccessOutOfBoundsException} with the specified detail message. The error message string
-     * {@code message} can later be retrieved by the {@link Throwable#getMessage getMessage} method.
-     *
-     * @param message
-     *            the detailed reason of the exception
-     */
-    public AccessOutOfBoundsException(String message) {
-        super(message);
-    }
-}
--- a/src/se/classes/jdk/dio/mmio/MMIODevice.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.ClosedDeviceException;
-import jdk.dio.Device;
-import jdk.dio.DeviceManager;
-import jdk.dio.UnavailableDeviceException;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import romizer.WeakDontRenameClass;
-
-/**
- * The {@code MMIODevice} class provides methods to retrieve memory-mapped registers and memory blocks of a device
- * device.
- * <p />
- * An MMIO device may be identified by the numeric ID and by the name (if any defined) that correspond to its
- * registered configuration. An {@code MMIODevice} instance can be opened by a call to one of the
- * {@link DeviceManager#open(int) DeviceManager.open(id,...)} methods using its ID or by a call to one of the
- * {@link DeviceManager#open(java.lang.String, java.lang.Class, java.lang.String[])
- * DeviceManager.open(name,...)} methods using its name. When an {@code MMIODevice} instance is opened with an
- * ad-hoc {@link MMIODeviceConfig} configuration (which includes its hardware addressing information) using one of the
- * {@link DeviceManager#open(jdk.dio.DeviceConfig) DeviceManager.open(config,...)} it is not
- * assigned any ID nor name.
- * <p />
- * With memory-mapped I/O, devices can be controlled by directly reading or writing to memory areas
- * representing the registers or memory blocks of the device. Each register or memory block is represented by
- * a {@link RawMemory} instance. Each register or memory block is also usually assigned a name which can be used for
- * name-based lookup. The complete memory area the device is mapped to can also be retrieved as single
- * {@link RawBlock} instance, allowing for offset-based access to all the registers and memory blocks of the device.
- * <p/>
- * An application can register an {@link MMIOEventListener} instance to monitor native events of the designated type
- * fired by the device. To register a {@link MMIOEventListener} instance, the application must call the
- * {@link #setMMIOEventListener(int, MMIOEventListener)} method. The registered listener can later on be removed by
- * calling the same method with a {@code null} listener parameter. Asynchronous notification may not be supported by all
- * memory-mapped devices. An attempt to set a listener on a memory-mapped device which does not supports it will result
- * in an {@link UnsupportedOperationException} being thrown.
- * <p />
- * When done, an application should call the {@link #close MMIODevice.close} method to close the MMIO device. Any
- * further attempt to access an MMIO device which has been closed will result in a {@link ClosedDeviceException}
- * been thrown.
- * <p />
- * Opening a {@link MMIODevice} instance is subject to permission checks (see {@link MMIOPermission}).
- * <p />
- * The event types (IDs) supported by a memory-mapped device are device as well as platform specific. For
- * example, each interrupt request line of a device may be mapped to a distinct event type ID. Refer to the
- * device data sheet and the platform configuration.
- * <p />
- * The {@code byte}, {@code short} and {@code int} values passed to and returned by this API have to be
- * interpreted as 8 bit, 16 bit and 32 bit unsigned quantities. Proper handling is needed when performing integer
- * arithmetic on these quantities.
- *
- * @see MMIOPermission
- * @see ClosedDeviceException
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-@WeakDontRenameClass
-public interface MMIODevice extends Device<MMIODevice> {
-
-    /**
-     * Gets the complete memory area this device is mapped to as a {@code RawBlock} instance.
-     *
-     * @return a {@link RawBlock} object encapsulating whole memory area this device is mapped to.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    RawBlock getAsRawBlock() throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Gets the designated memory block.
-     *
-     * @param name
-     *            name of the memory block.
-     * @return a {@link RawBlock} object encapsulating the designated memory block.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws IllegalArgumentException
-     *             if the provided name does not correspond to any memory block.
-     * @throws NullPointerException
-     *             if {@code name} is {@code null}.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    RawBlock getBlock(String name) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Returns the byte ordering of this memory-mapped device.
-     *
-     * @return {@link #BIG_ENDIAN} if big-endian; {@link #LITTLE_ENDIAN} if little-endian; {@link #MIXED_ENDIAN}
-     *         otherwise.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    int getByteOrdering() throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Gets the designated register holding a value of the designated type.
-     *
-     * @param name
-     *            the name of the register.
-     * @param type
-     *            the type of the value held in the register.
-     * @return a {@link RawRegister} object encapsulating the value of the designated register.
-     * @throws IllegalArgumentException
-     *             if the provided name does not correspond to any register or if the type of of the value held in the
-     *             register does not match.
-     * @throws NullPointerException
-     *             if {@code name} or {@code type} is {@code null}.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    <T extends Number> RawRegister<T> getRegister(String name, Class<T> type) throws IOException,
-            UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Registers a {@link MMIOEventListener} instance to monitor native events of the designated type fired by the
-     * device mapped to this </code>MMIODevice</code> object and capture the content of designated memory
-     * area.
-     * <p />
-     * While the listener can be triggered by hardware interrupts, there are no real-time guarantees of when the
-     * listener will be called.
-     * <p />
-     * The content of the designated memory area will be captured upon the occurrence of the designated event.
-     * Upon notification of the corresponding {@link MMIOEvent}, the captured content of a designated memory area
-     * may be retrieved using {@link MMIOEvent#getCapturedMemoryContent MMIOEvent.getCapturedMemoryContent}.
-      * <p />
-     * If this {@code MMIODevice} is open in {@link DeviceManager#SHARED} access mode
-     * the listeners registered by all the applications sharing the underlying device will get
-     * notified of the events they registered for.
-     * <p />
-     * If {@code listener} is {@code null} then listener previously registered for the specified event type will be
-     * removed.
-     * <p />
-     * Only one listener can be registered at a particular time for a particular event type.
-     *
-     * @param eventId
-     *            ID of the native event to listen to.
-     * @param capturedIndex
-     *            the byte index in this device mapped raw memory area to capture.
-     * @param captureBuffer
-     *            the direct {@link ByteBuffer} to save the captured memory area in; up to {@code captureBuffer.remaining()} bytes will
-     *            be copied from this device mapped raw memory area starting at {@code capturedIndex}
-     *            into this buffer starting at the buffer's position at the moment this method is called.
-     * @param listener
-     *            the {@link MMIOEventListener} instance to be notified upon occurrence of the designated event.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws AccessOutOfBoundsException
-     *             if {@code capturedIndex} and/or {@code captureBuffer.remaining()} would result in pointing outside this device
-     *             mapped raw memory area.
-     * @throws IllegalArgumentException
-     *             if {@code eventId} does not correspond to any supported event or if {@code captureBuffer} is not a direct {@link ByteBuffer}.
-     * @throws UnsupportedOperationException
-     *             if this {@code MMIODevice} object does not support asynchronous event notification.
-     * @throws IllegalStateException
-     *             if {@code listener} is not {@code null} and a listener is already registered for the specified event
-     *             type.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     * @throws NullPointerException
-     *             if {@code captureBuffer} is {@code null}.
-     */
-    void setMMIOEventListener(int eventId, int capturedIndex, ByteBuffer captureBuffer,
-            MMIOEventListener listener) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Registers a {@link MMIOEventListener} instance to monitor native events of the designated type fired by the
-     * device mapped to this </code>MMIODevice</code> object. While the listener can be triggered by hardware
-     * interrupts, there are no real-time guarantees of when the listener will be called.
-     * <p />
-     * If this {@code MMIODevice} is open in {@link DeviceManager#SHARED} access mode
-     * the listeners registered by all the applications sharing the underlying device will get
-     * notified of the events they registered for.
-     * <p />
-     * If {@code listener} is {@code null} then listener previously registered for the specified event type will be
-     * removed.
-     * <p />
-     * Only one listener can be registered at a particular time for a particular event type.
-     *
-     * @param eventId
-     *            ID of the native event to listen to.
-     * @param listener
-     *            the {@link MMIOEventListener} instance to be notified upon occurrence of the designated event.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws IllegalArgumentException
-     *             if {@code eventId} does not correspond to any supported event.
-     * @throws UnsupportedOperationException
-     *             if this {@code MMIODevice} object does not support asynchronous event notification.
-     * @throws IllegalStateException
-     *             if {@code listener} is not {@code null} and a listener is already registered for the specified event
-     *             type.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void setMMIOEventListener(int eventId, MMIOEventListener listener) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Registers a {@link MMIOEventListener} instance to monitor native events of the designated type fired by the
-     * device mapped to this </code>MMIODevice</code> object and capture the content of designated register
-     * or block.
-     * <p />
-     * While the listener can be triggered by hardware interrupts, there are no real-time guarantees of when the
-     * listener will be called.
-     * <p />
-     * The content of the designated register or block will be captured upon the occurrence of the designated event.
-     * Upon notification of the corresponding {@link MMIOEvent}, the captured value of a designated register may
-     * be retrieved using {@link MMIOEvent#getCapturedRegisterValue MMIOEvent.getCapturedRegisterValue} while the captured content of a designated block
-     * may be retrieved using {@link MMIOEvent#getCapturedMemoryContent MMIOEvent.getCapturedMemoryContent}.
-     * <p />
-     * If this {@code MMIODevice} is open in {@link DeviceManager#SHARED} access mode
-     * the listeners registered by all the applications sharing the underlying device will get
-     * notified of the events they registered for.
-     * <p />
-     * If {@code listener} is {@code null} then listener previously registered for the specified event type will be
-     * removed.
-     * <p />
-     * Only one listener can be registered at a particular time for a particular event type.
-     *
-     * @param eventId
-     *            ID of the native event to listen to.
-     * @param capturedName
-     *            the name of the register or memory block whose content is to be captured at the time of the underlying
-     *            event occurs.
-     * @param listener
-     *            the {@link MMIOEventListener} instance to be notified upon occurrence of the designated event.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws IllegalArgumentException
-     *             if {@code eventId} does not correspond to any supported event; or if the provided name does not
-     *             correspond to any memory block or register.
-     * @throws UnsupportedOperationException
-     *             if this {@code MMIODevice} object does not support asynchronous event notification.
-     * @throws IllegalStateException
-     *             if {@code listener} is not {@code null} and a listener is already registered for the specified event
-     *             type.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     * @throws NullPointerException
-     *             if {@code capturedName} is {@code null}.
-     */
-    void setMMIOEventListener(int eventId, String capturedName, MMIOEventListener listener) throws IOException,
-            UnavailableDeviceException, ClosedDeviceException;
-}
--- a/src/se/classes/jdk/dio/mmio/MMIODeviceConfig.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.DeviceConfig;
-import jdk.dio.InvalidDeviceConfigException;
-import jdk.dio.DeviceManager;
-import java.util.Arrays;
-import java.util.Objects;
-
-import serializator.*;
-import romizer.*;
-
-/**
- * The {@code MMIODeviceConfig} class encapsulates the hardware addressing information, and static and dynamic
- * configuration parameters of an MMIO device.
- * <p />
- * Some hardware addressing parameter, and static and dynamic configuration parameters may be set to {@link #DEFAULT}.
- * Whether such default settings are supported is platform- as well as device driver-dependent.
- * <p />
- * An instance of {@code MMIODeviceConfig} can be passed to the {@link DeviceManager#open(DeviceConfig)} or
- * {@link DeviceManager#open(Class, DeviceConfig)} method to open the designated MMIO device with the specified
- * configuration. A {@link InvalidDeviceConfigException} is thrown when attempting to open a device with
- * an invalid or unsupported configuration.
- *
- * @see DeviceManager#open(DeviceConfig)
- * @see DeviceManager#open(Class, DeviceConfig)
- * @since 1.0
- */
-@SerializeMe
-@DontRenameClass
-@apimarker.API("device-io_1.0")
-public final class MMIODeviceConfig implements DeviceConfig<MMIODevice>, DeviceConfig.HardwareAddressing {
-
-    /**
-     * The {@code RawBlockConfig} class encapsulates the configuration parameters of a memory block.
-     */
-    public static final class RawBlockConfig extends RawMemoryConfig {
-
-        private int size;
-
-        /**
-         * Constructs a new {@code RawBlockConfig} with the provided parameters.
-         *
-         * @param offset
-         *            the offset of the register from the base address (a positive or zero integer).
-         * @param name
-         *            the name for the register.
-         * @param size
-         *            the size in bytes of the memory block (a positive integer).
-         *
-         * @throws IllegalArgumentException
-         *             if any of the following is true:
-         *             <ul>
-         *             <li>{@code offset} is lesser than {@code 0};</li>
-         *             <li>{@code size} is lesser than or equal to {@code 0}.</li>
-         *             </ul>
-         * @throws NullPointerException
-         *             if {@code name} is {@code null}.
-         */
-        public RawBlockConfig(int offset, String name, int size) {
-            super(offset, name);
-            this.size = size;
-        }
-
-        /**
-         * Gets the configured size in bytes of the memory block.
-         *
-         * @return the size in bytes of the memory block (a positive integer).
-         */
-        public int getSize() {
-            return size;
-        }
-
-    /**
-     * Returns the hash code value for this object.
-     *
-     * @return a hash code value for this object.
-     */
-        @Override
-        public int hashCode() {
-            int hash = 3;
-            hash = 37 * hash + this.size;
-            return hash;
-        }
-
-    /**
-     * Checks two {@code RawBlockConfig} objects for equality.
-     *
-     * @param obj
-     *            the object to test for equality with this object.
-     *
-     * @return {@code true} if {@code obj} is a {@code RawBlockConfig} and has
-     * the same hardware addressing information and configuration parameter values
-     * as this {@code RawBlockConfig} object.
-     */
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            final RawBlockConfig other = (RawBlockConfig) obj;
-            if (this.size != other.size) {
-                return false;
-            }
-            return true;
-        }
-
-    }
-
-    /**
-     * The {@code RawMemoryConfig} class encapsulates the configuration parameters of a generic raw memory area.
-     */
-    @SerializeMe
-    @DontRenameClass
-    @apimarker.API("device-io_1.0")
-    public static abstract class RawMemoryConfig {
-
-        private String name;
-        private int offset;
-
-        /**
-         * Constructs a new {@code RawMemoryConfig} with the provided parameters.
-         *
-         * @param offset
-         *            the offset of the raw memory area from the base address (a positive or zero integer).
-         * @param name
-         *            the name for the raw memory area.
-         *
-         * @throws IllegalArgumentException
-         *             if {@code offset} is lesser than {@code 0}.
-         * @throws NullPointerException
-         *             if {@code name} is {@code null}.
-         */
-        RawMemoryConfig(int offset, String name) {
-            this.offset = offset;
-            this.name = name;
-        }
-
-        /**
-         * Gets the configured name for the raw memory area.
-         *
-         * @return the name for the raw memory area.
-         */
-        public String getName() {
-            return name;
-        }
-
-        /**
-         * Gets the configured offset of the raw memory area from the base address.
-         *
-         * @return the offset of the raw memory area from the base address (a positive or zero integer).
-         */
-        public int getOffset() {
-            return offset;
-        }
-
-    /**
-     * Returns the hash code value for this object.
-     *
-     * @return a hash code value for this object.
-     */
-        @Override
-        public int hashCode() {
-            int hash = 7;
-            hash = 97 * hash + Objects.hashCode(this.name);
-            hash = 97 * hash + this.offset;
-            return hash;
-        }
-
-    /**
-     * Checks two {@code RawMemoryConfig} objects for equality.
-     *
-     * @param obj
-     *            the object to test for equality with this object.
-     *
-     * @return {@code true} if {@code obj} is a {@code RawMemoryConfig} and has
-     * the same hardware addressing information and configuration parameter values
-     * as this {@code RawMemoryConfig} object.
-     */
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            final RawMemoryConfig other = (RawMemoryConfig) obj;
-            if (!Objects.equals(this.name, other.name)) {
-                return false;
-            }
-            if (this.offset != other.offset) {
-                return false;
-            }
-            return true;
-        }
-
-    }
-
-    /**
-     * The {@code RawRegisterConfig} class encapsulates the configuration parameters of a register.
-     *
-     * @param <T>
-     *            the type of the value held by the register.
-     */
-    public static final class RawRegisterConfig<T extends Number> extends RawMemoryConfig {
-        private Class<T> type;
-
-        /**
-         * Constructs a new {@code RawRegisterConfig} with the provided parameters.
-         *
-         * @param offset
-         *            the offset of the register from the base address (a positive or zero integer).
-         * @param name
-         *            the name for the register.
-         * @param type
-         *            the type of the value held by the register, one of: {@link Byte}, {@link Short} or {@link Integer}
-         *            .
-         *
-         * @throws IllegalArgumentException
-         *             if any of the following is true:
-         *             <ul>
-         *             <li>{@code offset} is lesser than {@code 0};</li>
-         *             <li>{@code type} is not one of the defined values.</li>
-         *             </ul>
-         * @throws NullPointerException
-         *             if {@code name} is {@code null}.
-         */
-        public RawRegisterConfig(int offset, String name, Class<T> type) {
-            super(offset, name);
-            this.type = type;
-        }
-
-        /**
-         * Gets the configured type of the value held by the register.
-         *
-         * @return the type of the value held by the register, one of: {@link Byte}, {@link Short} or {@link Integer}.
-         */
-        public Class<T> getType() {
-            return type;
-        }
-
-    /**
-     * Returns the hash code value for this object.
-     *
-     * @return a hash code value for this object.
-     */
-        @Override
-        public int hashCode() {
-            int hash = 5;
-            hash = 67 * hash + Objects.hashCode(this.type);
-            return hash;
-        }
-
-    /**
-     * Checks two {@code RawRegisterConfig} objects for equality.
-     *
-     * @param obj
-     *            the object to test for equality with this object.
-     *
-     * @return {@code true} if {@code obj} is a {@code RawRegisterConfig} and has
-     * the same hardware addressing information and configuration parameter values
-     * as this {@code RawRegisterConfig} object.
-     */
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            final RawRegisterConfig<T> other = (RawRegisterConfig<T>) obj;
-            if (!Objects.equals(this.type, other.type)) {
-                return false;
-            }
-            return true;
-        }
-    }
-
-    private long address;
-    private int controllerNumber = DEFAULT;
-    private String controllerName = null;
-
-    private int byteOrdering = DEFAULT;
-
-    private RawMemoryConfig[] memConfigs = null;
-
-    private int size;
-
-    /**
-     * Creates a new {@code MMIODeviceConfig} with the specified hardware addressing information and configuration
-     * parameters.
-     * <p />
-     * If no raw block and raw register configuration is provided, the specified memory area will be mapped to
-     * the {@link RawBlock} instance returned by a call to {@link MMIODevice#getAsRawBlock MMIODevice.getAsRawBlock}.
-     * <p />
-     * If the designated memory region is protected or if it overlaps with that of an existing
-     * MMIO device configuration and the requested access mode ({@link DeviceManager#EXCLUSIVE} or
-     * {@link DeviceManager#SHARED}) is incompatible or unsupported, attempting to open an {@code MMIODevice}
-     * device using this configuration may result in either a {@code SecurityException} or
-     * a {@link InvalidDeviceConfigException} to be thrown.
-     *
-    * @param address
-     *            the memory address of the device (a positive or zero integer).
-     * @param size
-     *            the size of the memory-mapped area of the device (a positive integer).
-     * @param byteOrdering
-     *            the byte ordering of the device, one of: {@link MMIODevice#BIG_ENDIAN},
-     *            {@link MMIODevice#LITTLE_ENDIAN}, {@link MMIODevice#MIXED_ENDIAN} or {@link MMIODeviceConfig#DEFAULT}.
-     * @param memConfigs
-     *            the raw block and raw register configurations (may be {@code null} or empty).
-     *
-     * @throws IllegalArgumentException
-     *             if any of the following is true:
-     *             <ul>
-     *             <li>{@code address} is not in the defined range;</li>
-     *             <li>{@code size} is not in the defined range;</li>
-     *             <li>{@code byteOrdering} is not one of the defined values.</li>
-     *             </ul>
-     * @throws IndexOutOfBoundsException
-     *             if any of the {@code memConfigs} elements is pointing outside of the defined address range ([
-     *             {@code 0}-</code>size</code>]).
-     */
-    public MMIODeviceConfig(long address, int size, int byteOrdering, RawMemoryConfig... memConfigs) {
-        this.address = address;
-        this.size = size;
-        this.byteOrdering = byteOrdering;
-        if (memConfigs != null) {
-            this.memConfigs = memConfigs.clone();
-        }
-    }
-
-    /**
-     * Creates a new {@code MMIODeviceConfig} with the specified hardware addressing information and configuration
-     * parameters.
-     * <p />
-     * If no raw block and raw register configuration is provided, the specified memory area will be mapped to
-     * the {@link RawBlock} instance returned by a call to {@link MMIODevice#getAsRawBlock MMIODevice.getAsRawBlock}.
-     *
-     * @param controllerName
-     *            the controller name (such as its <em>device file</em> name on UNIX systems).
-     * @param address
-     *            the memory address of the device (a positive or zero integer)or {@link MMIODeviceConfig#DEFAULT}.
-     * @param size
-     *            the size of the memory-mapped area of the device (a positive integer).
-     * @param byteOrdering
-     *            the byte ordering of the device, one of: {@link MMIODevice#BIG_ENDIAN},
-     *            {@link MMIODevice#LITTLE_ENDIAN}, {@link MMIODevice#MIXED_ENDIAN} or {@link MMIODeviceConfig#DEFAULT}.
-     * @param memConfigs
-     *            the raw block and raw register configurations (may be {@code null} or empty).
-     *
-     * @throws IllegalArgumentException
-     *             if any of the following is true:
-     *             <ul>
-     *             <li>{@code address} is not in the defined range;</li>
-     *             <li>{@code size} is not in the defined range;</li>
-     *             <li>{@code byteOrdering} is not one of the defined values.</li>
-     *             </ul>
-     * @throws NullPointerException
-     *             if {@code controllerName} is {@code null}.
-     * @throws IndexOutOfBoundsException
-     *             if any of the {@code memConfigs} elements is pointing outside of the defined address range ([
-     *             {@code 0}-</code>size</code>]).
-     */
-    public MMIODeviceConfig(String controllerName, long address, int size, int byteOrdering, RawMemoryConfig... memConfigs) {
-        this.controllerName = controllerName;
-        this.address = address;
-        this.size = size;
-        this.byteOrdering = byteOrdering;
-        if (memConfigs != null) {
-            this.memConfigs = memConfigs.clone();
-        }
-    }
-
-    /**
-     * Gets the configured memory address of the MMIO device.
-     *
-     * @return the memory address of the MMIO device (a positive or zero integer) or {@link MMIODeviceConfig#DEFAULT}..
-     */
-    public long getAddress() {
-        return address;
-    }
-
-    /**
-     * Gets the configured controller name (such as its <em>device file</em> name on UNIX systems).
-     *
-     * @return the controller name or {@code null}.
-     */
-    @Override
-    public String getControllerName() {
-        return controllerName;
-    }
-
-    /**
-     * Gets the configured controller number.
-     *
-     * @return {@link #DEFAULT}.
-     */
-    @Override
-    public int getControllerNumber() {
-        return controllerNumber;
-    }
-
-    /**
-     * Gets the configured byte ordering of the MMIO device.
-     *
-     * @return the byte ordering of the MMIO device, one of: {@link MMIODevice#BIG_ENDIAN},
-     *         {@link MMIODevice#LITTLE_ENDIAN}, {@link MMIODevice#MIXED_ENDIAN} or {@link MMIODeviceConfig#DEFAULT}.
-     */
-    public int getByteOrdering() {
-        return byteOrdering;
-    }
-
-    /**
-     * Gets the set of configured registers and memory blocks.
-     *
-     * @return an array (a defensive copy thereof) containing the set of configured registers and memory blocks or
-     *         {@code null} if none is defined.
-     */
-    public RawMemoryConfig[] getRawMemoryConfigs() {
-        if (memConfigs != null) {
-            return memConfigs.clone();
-        }
-        return null;
-    }
-
-    /**
-     * Gets the configured size of the memory-mapped area of the MMIO device.
-     *
-     * @return the size of the memory-mapped area of the device (a positive integer).
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * Returns the hash code value for this object.
-     *
-     * @return a hash code value for this object.
-     */
-    @Override
-    public int hashCode() {
-        int hash = 5;
-        hash = 97 * hash + (int) (this.address ^ (this.address >>> 32));
-        hash = 97 * hash + this.controllerNumber;
-        hash = 97 * hash + Objects.hashCode(this.controllerName);
-        hash = 97 * hash + this.byteOrdering;
-        for (RawMemoryConfig memConfig : this.memConfigs) {
-            hash = 97 * hash + Objects.hashCode(memConfig);       }
-        hash = 97 * hash + this.size;
-        return hash;
-    }
-
-    /**
-     * Checks two {@code MMIODeviceConfig} objects for equality.
-     *
-     * @param obj
-     *            the object to test for equality with this object.
-     *
-     * @return {@code true} if {@code obj} is a {@code MMIODeviceConfig} and has
-     * the same hardware addressing information and configuration parameter values
-     * as this {@code MMIODeviceConfig} object.
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final MMIODeviceConfig other = (MMIODeviceConfig) obj;
-        if (this.address != other.address) {
-            return false;
-        }
-        if (this.controllerNumber != other.controllerNumber) {
-            return false;
-        }
-        if (!Objects.equals(this.controllerName, other.controllerName)) {
-            return false;
-        }
-        if (this.byteOrdering != other.byteOrdering) {
-            return false;
-        }
-        if (!Arrays.equals(this.memConfigs, other.memConfigs)) {
-            return false;
-        }
-        if (this.size != other.size) {
-            return false;
-        }
-        return true;
-    }
-}
--- a/src/se/classes/jdk/dio/mmio/MMIOEvent.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.DeviceEvent;
-import java.nio.ByteBuffer;
-
-/**
- * The {@code MMIOEvent} class encapsulates events fired by devices mapped to memory.
- *
- * @see MMIODevice
- * @see MMIOEventListener
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-public class MMIOEvent extends DeviceEvent<MMIODevice> {
-
-    /**
-     * The captured content of the memory area or memory block designated upon registration.
-     */
-    private ByteBuffer capturedMemoryContent = null;
-
-    /**
-     * The captured value of the register designated upon registration.
-     */
-    private Number capturedRegisterValue = null;
-
-    /**
-     * This event ID.
-     */
-    private int id;
-
-    /**
-     * Creates a new {@link MMIOEvent} with the specified event ID and time-stamped
-     * with the current time.
-     *
-     * @param device
-     *            the source device.
-     * @param id
-     *            the event ID.
-     * @throws NullPointerException
-     *             if {@code device} is {@code null}.
-     * @throws IllegalArgumentException
-     *             if {@code id} is negative.
-     */
-    public MMIOEvent(MMIODevice device, int id) {
-        this(device, id, System.currentTimeMillis(), 0);
-    }
-
-    /**
-     * Creates a new {@link MMIOEvent} with the specified event ID and timestamp, and
-     * with the captured content of the memory area or memory block designated upon registration.
-     *
-     * @param device
-     *            the source device.
-     * @param id
-     *            the event ID.
-     * @param capturedMemoryContent
-     *            the captured content of the memory area or memory block designated upon registration.
-     * @param timeStamp
-     *            the timestamp (in milliseconds).
-     * @param timeStampMicros
-     *            the additional microseconds to the timestamp.
-     * @throws NullPointerException
-     *             if {@code device} or {@code capturedMemoryContent} is {@code null}.
-     * @throws IllegalArgumentException
-     *             if {@code id}, {@code timeStamp} or {@code timeStampMicros} is negative.
-     */
-    public MMIOEvent(MMIODevice device, int id, ByteBuffer capturedMemoryContent, long timeStamp, int timeStampMicros) {
-        this.device = device;
-        this.id = id;
-        this.capturedRegisterValue = null;
-        this.capturedMemoryContent = capturedMemoryContent;
-        this.timeStamp = timeStamp;
-        this.timeStampMicros = timeStampMicros;
-        this.count = 1;
-    }
-
-    /**
-     * Creates a new {@link MMIOEvent} with the specified event ID and timestamp.
-     *
-     * @param device
-     *            the source device.
-     * @param id
-     *            the event ID.
-     * @param timeStamp
-     *            the timestamp (in milliseconds).
-     * @param timeStampMicros
-     *            the additional microseconds to the timestamp.
-     * @throws NullPointerException
-     *             if {@code device} is {@code null}.
-     * @throws IllegalArgumentException
-     *             if {@code id}, {@code timeStamp} or {@code timeStampMicros} is negative.
-     */
-    public MMIOEvent(MMIODevice device, int id, long timeStamp, int timeStampMicros) {
-        this.device = device;
-        this.id = id;
-        this.capturedRegisterValue = null;
-        this.capturedMemoryContent = null;
-        this.timeStamp = timeStamp;
-        this.timeStampMicros = timeStampMicros;
-        this.count = 1;
-    }
-
-    /**
-     * Creates a new {@link MMIOEvent} with the specified event ID and timestamp, and
-     * the captured value of the register designated upon registration.
-     *
-     * @param <T> the type of the captured value.
-     *
-     * @param device
-     *            the source device.
-     * @param id
-     *            the event ID.
-     * @param capturedRegisterValue
-     *            the captured value of the register designated upon registration.
-     * @param timeStamp
-     *            the timestamp (in milliseconds).
-     * @param timeStampMicros
-     *            the additional microseconds to the timestamp.
-     * @throws NullPointerException
-     *             if {@code device} or {@code capturedRegisterValue} is {@code null}.
-     * @throws IllegalArgumentException
-     *             if {@code id}, {@code timeStamp} or {@code timeStampMicros} is negative.
-     */
-    public <T extends Number> MMIOEvent(MMIODevice device, int id, T capturedRegisterValue, long timeStamp,
-            int timeStampMicros) {
-        this.device = device;
-        this.id = id;
-        this.capturedRegisterValue = capturedRegisterValue;
-        this.capturedMemoryContent = null;
-        this.timeStamp = timeStamp;
-        this.timeStampMicros = timeStampMicros;
-        this.count = 1;
-    }
-
-    /**
-     * Gets the captured content of the memory area or memory block designated upon registration.
-     *
-     * @return the captured content of the memory area or block; or {@code null} if no memory area or block content was
-     *         captured. If the listener was registered using the MMIODevice#setMMIOEventListener(int, int, ByteBuffer, jdk.dio.mmio.MMIOEventListener) method
-     *         the {@code ByteBuffer} returned is the {@code ByteBuffer} that was passed as the {@code captureBuffer} parameter.
-     *
-     * @see MMIODevice#setMMIOEventListener(int, java.lang.String, jdk.dio.mmio.MMIOEventListener)
-     * @see MMIODevice#setMMIOEventListener(int, int, ByteBuffer, jdk.dio.mmio.MMIOEventListener)
-     */
-    public ByteBuffer getCapturedMemoryContent() {
-        return capturedMemoryContent;
-    }
-
-    /**
-     * Gets the captured value of the register designated upon registration.
-     *
-     * @param <T>
-     *            the type of the value held by the register.
-     * @return the captured value of the register designated upon registration or {@code null} if no register value was captured.
-     *
-     * @see MMIODevice#setMMIOEventListener(int, java.lang.String, jdk.dio.mmio.MMIOEventListener)
-     */
-    @SuppressWarnings("unchecked")
-    public <T extends Number> T getCapturedRegisterValue() {
-        return (T) capturedRegisterValue;
-    }
-
-    /**
-     * Returns this event ID.
-     *
-     * @return this event ID.
-     */
-    public int getID() {
-        return id;
-    }
-}
\ No newline at end of file
--- a/src/se/classes/jdk/dio/mmio/MMIOEventListener.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.DeviceEventListener;
-
-/**
- * The {@code MMIOEventListener} interface defines methods for getting notified of events fired by devices mapped to
- * memory. <br />
- * A {@code MMIOEventListener} can be registered using one of the
- * {@link MMIODevice#setMMIOEventListener(int, MMIOEventListener) setMMIOEventListener} methods.
- *
- * @see MMIODevice#setMMIOEventListener MMIODevice.setMMIOEventListener
- * @see MMIOEvent
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-public interface MMIOEventListener extends DeviceEventListener {
-
-    /**
-     * Invoked when an event is fired by a memory-mapped device.
-     *
-     * @param event
-     *            the event that occurred.
-     */
-    void eventDispatched(MMIOEvent event);
-}
\ No newline at end of file
--- a/src/se/classes/jdk/dio/mmio/MMIOPermission.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import com.oracle.dio.utils.ActionFactory;
-
-import jdk.dio.DevicePermission;
-
-/**
- * The {@code MMIOPermission} class defines permissions for MMIO device access.
- * <p />
- * A {@code MMIOPermission} permission has a target name and a list of actions.
- * <p />
- * The target name contains hardware addressing information. The format is the one defined for the base {@link DevicePermission} class
- * with the following addition:
- * <dl>
- * <dt><code>{channel-desc}</code></dt>
- * <dd>
- * The <code>{channel-desc}</code> string (described in {@link DevicePermission}) is
- * a memory-address (in hexadecimal format) as may be returned by a call to {@link MMIODeviceConfig#getAddress MMIODeviceConfig.getAddress}.
- * The characters in the string must all be hexadecimal digits.
- * </dd>
- * </dl>
- * The supported actions are {@code open} and {@code powermanage}. Their meaning is defined as follows:
- * <dl>
- * <dt>{@code open}</dt>
- * <dd>open and access an MMIO device functions (see {@link DeviceManager#open DeviceManager.open})</dd>
- * <dt>{@code powermanage}</dt>
- * <dd>manage the power saving mode of a device (see {@link jdk.dio.power.PowerManaged})</dd>
- * </dl>
- *
- * @see DeviceManager#open DeviceManager.open
- * @see jdk.dio.power.PowerManaged
- */
-@SuppressWarnings("serial")
-@apimarker.API("device-io_1.0")
-public class MMIOPermission extends DevicePermission  {
-
-    /**
-     * Constructs a new {@code MMIOPermission} with the specified target name and the implicit {@code open} action.
-     *
-     * @param name
-     *            the target name (as defined above).
-     * @throws NullPointerException
-     *             if {@code name} is {@code null}.
-     *
-     * @see #getName getName
-     */
-    public MMIOPermission(String name) {
-        super(name);
-    }
-
-    /**
-     * Constructs a new {@code MMIOPermission} instance with the specified target name and action list.
-     *
-     * @param name
-     *            the target name (as defined above).
-     * @param actions
-     *            comma-separated list of device operations: {@code open} or {@code powermanage}.
-     * @throws NullPointerException
-     *             if {@code name} is {@code null}.
-     * @throws IllegalArgumentException
-     *             if actions is {@code null}, empty or contains an action other than the
-     *             specified possible actions.
-     *
-     * @see #getName getName
-     */
-    public MMIOPermission(String name, String actions) {
-        super(name, ActionFactory.verifyAndOrderDeviceActions(actions));
-    }
-}
--- a/src/se/classes/jdk/dio/mmio/RawBlock.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.ClosedDeviceException;
-import jdk.dio.UnavailableDeviceException;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * The {@code RawBlock} interface provides methods to access a continuous range of physical memory (raw memory) as a
- * {@link ByteBuffer}. A {@code RawBlock} instance can be obtained from a {@link MMIODevice} instance.
- * <p />
- * The {@code index} parameter of {@code ByteBuffer} <i>absolute</i> operations map to physical memory addresses. The
- * {@code index} values are relative to the base address of the raw memory area. The {@code index} value {@code 0}
- * corresponds to the base address of the raw memory area.
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-public interface RawBlock extends RawMemory {
-    /**
-     * Gets the complete memory area this {@code RawBlock} is mapped to as a <em>direct</em> {@link ByteBuffer}. The
-     * byte order of the retrieved buffer will be that of this device unless the byte ordering is not standard (as
-     * indicated by the value {@link MMIODevice#MIXED_ENDIAN}; in which case the buffer's byte order will be set to
-     * {@link ByteOrder#BIG_ENDIAN}.
-     * <p />
-     * When the returned {@code ByteBuffer} instance is invalidated because the device is either closed or in
-     * exclusive use by some other application then an attempt to access the {@code ByteBuffer} instance will not change
-     * the buffer's content and will cause a {@code ClosedDeviceException} or some other unspecified exception to be
-     * thrown either at the time of the access or at some later time.
-     *
-     * @return the <em>direct</em> {@link ByteBuffer} for the complete raw memory area associated with this
-     *         {@code RawBlock}.
-     * @throws IOException
-     *             if some other I/O error occurs.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    ByteBuffer asDirectBuffer() throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Returns the name assigned to this {@code RawBlock} instance.
-     *
-     * @return this {@code RawBlock} instance's name or {@code null} if this {@code RawBlock} instance was obtained by a
-     *         call to {@link MMIODevice#getAsRawBlock MMIODevice.getAsRawBlock}.
-     */
-    @Override
-    String getName();
-}
\ No newline at end of file
--- a/src/se/classes/jdk/dio/mmio/RawMemory.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-/**
- * The {@code RawMemory} interface provides generic methods for the different types of raw memory area a device
- * device's registers may be mapped to.
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-public interface RawMemory {
-
-    /**
-     * Returns the name assigned to this {@code RawMemory} instance.
-     *
-     * @return this {@code RawMemory} instance's name.
-     */
-    String getName();
-}
\ No newline at end of file
--- a/src/se/classes/jdk/dio/mmio/RawRegister.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.dio.mmio;
-
-import jdk.dio.ClosedDeviceException;
-import jdk.dio.UnavailableDeviceException;
-import java.io.IOException;
-
-/**
- * The {@code RawRegister} interface provides methods for setting and getting the value of a register or memory area
- * holding a value of type {@code byte}, {@code short}, {@code int} or {@code long}. A {@code RawRegister} instance can
- * be obtained from a {@link MMIODevice} instance.
- * <p />
- * Developers should be aware when using this API of the potential performance and memory allocation penalty induced by
- * primitive auto-boxing. For intensive reading and writing of registers such as data input and data output registers,
- * the use of the {@link RawBlock} returned by {@link MMIODevice#getAsRawBlock() } should be preferred.
- *
- * @param <T>
- *            the type of the value held by the register.
- * @since 1.0
- */
-@apimarker.API("device-io_1.0")
-public interface RawRegister<T extends Number> extends RawMemory {
-
-    /**
-     * Sets the value at the memory area associated with this object to the result of performing a logical AND of the
-     * value at the memory area with the argument value.
-     *
-     * @param value
-     *            the value to perform a logical AND with.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void and(T value) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Clears (sets to {@code 0}) the designated bit value at the memory area associated with this object.
-     *
-     * @param index
-     *            the index of the bit.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     * @throws IllegalArgumentException
-     *             if {@code index} is less than {@code 0} or greater or equal to the size in bits of the value at the
-     *             memory area associated with this object.
-     */
-    void clearBit(int index) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Clears (sets to {@code 0}) the specified bits at the memory area associated with this object.
-     *
-     * @param mask
-     *            the bit mask.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void clearBits(T mask) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Gets the value at the memory area associated with this object.
-     *
-     * @return the value.
-     * @throws IOException
-     *             if the associated memory area is not readable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    T get() throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Returns the type of the value this {@code RawRegister} instance can hold.
-     *
-     * @return this {@code RawRegister} instance's value type.
-     */
-    Class<T> getType();
-
-    /**
-     * Checks whether the designated bit value at the memory area associated with this object is set (equal to {@code 1}
-     * )
-     *
-     * @param index
-     *            the index of the bit.
-     * @return the bit value.
-     * @throws IOException
-     *             if the associated memory area is not readable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     * @throws IllegalArgumentException
-     *             if {@code index} is less than {@code 0} or greater or equal to the size in bits of the value at the
-     *             memory area associated with this object.
-     */
-    boolean isBitSet(int index) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Sets the value at the memory area associated with this object to the result of performing a logical OR of the
-     * value at the memory area with the argument value.
-     *
-     * @param value
-     *            the value to perform a logical OR with.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void or(T value) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Sets the value at the memory area associated with this object.
-     *
-     * @param value
-     *            the value to set.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void set(T value) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Sets (to {@code 1}) the designated bit value at the memory area associated with this object.
-     *
-     * @param index
-     *            the index of the bit.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     * @throws IllegalArgumentException
-     *             if {@code index} is less than {@code 0} or greater or equal to the size in bits of the value at the
-     *             memory area associated with this object.
-     */
-    void setBit(int index) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Sets (to {@code 1}) the specified bits at the memory area associated with this object.
-     *
-     * @param mask
-     *            the bit mask.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void setBits(T mask) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-
-    /**
-     * Sets the value at the memory area associated with this object to the result of performing a logical XOR of the
-     * value at the memory area with the argument value.
-     *
-     * @param value
-     *            the value to perform a logical XOR with.
-     * @throws IOException
-     *             if the associated memory area is not writable.
-     * @throws UnavailableDeviceException
-     *             if this device is not currently available - such as it is locked by another application.
-     * @throws ClosedDeviceException
-     *             if the device has been closed.
-     */
-    void xor(T value) throws IOException, UnavailableDeviceException, ClosedDeviceException;
-}
\ No newline at end of file
--- a/src/se/classes/jdk/dio/mmio/package-info.java	Tue May 12 13:29:46 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/**
- * Interfaces and classes for performing memory-mapped I/O.
- * <p />
- * Memory mapped I/O is typically used for controlling hardware devices by reading from and writing to registers or
- * memory blocks of the hardware mapped to the system memory. The MMIO APIs allows for low level control over the
- * device.
- * <p />
- * In order to access a specific memory block a device has been mapped to, an application should first open and obtain
- * an {@link jdk.dio.mmio.MMIODevice} instance for the memory-mapped I/O device the application wants to
- * control and access, using its numeric ID, name, type (interface) and/or properties:
- * <dl>
- * <dt>Using its ID</dt>
- * <dd>
- * <blockquote>
- *
- * <pre>
- * MMIODevice device = (MMIODevice) DeviceManager.open(7);
- * </pre>
- *
- * </blockquote></dd>
- * <dt>Using its name and interface</dt>
- * <dd>
- * <blockquote>
- *
- * <pre>
- * MMIODevice device = DeviceManager.open(&quot;RTC&quot;, MMIODevice.class, null);
- * </pre>
- *
- * </blockquote></dd>
- * </dl>
- * Once the device opened, the application can retrieve registers using methods of the
- * {@link jdk.dio.mmio.MMIODevice MMIODevice} interface such as the
- * {@link jdk.dio.mmio.MMIODevice#getRegister MMIODevice.getRegister} method. <blockquote>
- *
- * <pre>
- * device.getRegister(&quot;Seconds&quot;, Byte.class);
- * </pre>
- *
- * </blockquote> When done, the application should call the {@link jdk.dio.mmio.MMIODevice#close MMIODevice.close}
- * method to close the MMIO device. <blockquote>
- *
- * <pre>
- * device.close();
- * </pre>
- *
- * </blockquote> The following sample codes give examples of using the MMIO API to communicate Real Time Clock device:
- * <blockquote>
- *
- * <pre>
- * static final int INTERRUPT = 0;
- *
- * try (MMIODevice rtc = DeviceManager.open("RTC", MMIODevice.class, null)) {
- *     //The RTC device has 14 bytes of clock and control registers and 50 bytes
- *     // of general purpose RAM (see the data sheet of the 146818 Real Time Clock such as HITACHI HD146818).
- *     RawRegister<Byte> seconds = rtc.getRegister("Seconds", Byte.class);
- *     RawRegister<Byte> secAlarm = rtc.getRegister("SecAlarm", Byte.class);
- *     RawRegister<Byte> minutes = rtc.getRegister("Minutes", Byte.class);
- *     RawRegister<Byte> minAlarm = rtc.getRegister("MinAlarm", Byte.class);
- *     RawRegister<Byte> hours = rtc.getRegister("Hours", Byte.class);
- *     RawRegister<Byte> hrAlarm = rtc.getRegister("HrAlarm", Byte.class);
- *     ... // More registers
- *     RawRegister<Byte> registerA = rtc.getRegister("RegisterA", Byte.class);
- *     RawRegister<Byte> registerB = rtc.getRegister("RegisterB", Byte.class);
- *     RawRegister<Byte> registerC = rtc.getRegister("RegisterC", Byte.class);
- *     RawRegister<Byte> registerD = rtc.getRegister("RegisterD", Byte.class);
- *     RawBlock userRAM = rtc.getBlock("UserRam");
- *     ...
- * } catch (IOException ioe) {
- *     // handle exception
- * }
- * </pre>
- *
- * </blockquote> The preceding example is using a <em>try-with-resources</em> statement; the
- * {@link jdk.dio.mmio.MMIODevice#close MMI0Device.close} method is automatically invoked by the
- * platform at the end of the statement. <blockquote>
- *
- * <pre>
- * // Sets the daily alarm for after some delay
- * public void setAlarm(MMIODevice rtc, byte delaySeconds, byte delayMinutes, byte delayHours) throws IOException,
- *         DeviceException {
- *     Register&lt;Byte&gt; seconds = rtc.getByteRegister(&quot;Seconds&quot;, Byte.class);
- *     Register&lt;Byte&gt; secAlarm = rtc.getByteRegister(&quot;SecAlarm&quot;, Byte.class);
- *     Register&lt;Byte&gt; minutes = rtc.getByteRegister(&quot;Minutes&quot;, Byte.class);
- *     Register&lt;Byte&gt; minAlarm = rtc.getByteRegister(&quot;MinAlarm&quot;, Byte.class);
- *     Register&lt;Byte&gt; hours = rtc.getByteRegister(&quot;Hours&quot;, Byte.class);
- *     Register&lt;Byte&gt; hrAlarm = rtc.getByteRegister(&quot;HrAlarm&quot;, Byte.class);
- *     Register&lt;Byte&gt; registerB = rtc.getByteRegister(&quot;RegisterB&quot;, Byte.class);
- *     RawBlock userRAM = rtc.getBlock(&quot;UserRam&quot;, Byte.class);
- *
- *     // Directly read from/write to the registers using RawByte instances.
- *     byte currentSeconds = seconds.get();
- *     byte currentMinutes = minutes.get();
- *     byte currentHours = hours.get();
- *     int i = (currentSeconds + delaySeconds) % 60;
- *     int j = (currentSeconds + delaySeconds) / 60;
- *     secAlarm.set((byte) i);
- *     i = (currentMinutes + delayMinutes + j) % 60;
- *     j = (currentMinutes + delayMinutes + j) / 60;
- *     minAlarm.set((byte) i);
- *     i = (currentHours + delayHours + j) % 24;
- *     hrAlarm.set((byte) i);
- *     rtc.setMMIOEventListener(INTERRUPT, new MMIOEventListener() {
- *
- *         public void eventDispatched(MMIOEvent event) {
- *             try {
- *                 MMIODevice rtc = event.getDevice();
- *                 Register&lt;Byte&gt; registerC = rtc.getByteRegister(&quot;RegisterC&quot;, Byte.class);
- *                 // Check the Alarm Interrupt Flag (AF)
- *                 if ((registerC.get() &amp; 0X20) != 0) {
- *                     // Notify application of alarm
- *                 }
- *             } catch (IOException ioe) {
- *                 // handle exception
- *             }
- *         }
- *     });
- *     // Set the Alarm Interrupt Enabled (AIE) flag
- *     registerB.set((byte) (registerB.get() | 0X20));
- * }
- * </pre>
- *
- * </blockquote> Alternatively, in this example, the value of {@code RegisterC} could be automatically captured upon
- * occurrence of an interrupt request from the Real Time Clock device as follows: <blockquote>
- *
- * <pre>
- * rtc.setMMIOEventListener(INTERRUPT, &quot;RegisterC&quot;, new MMIOEventListener() {
- *
- *     public void eventDispatched(MMIOEvent event) {
- *         Byte v = event.getCapturedRegisterValue();
- *         // Check the Alarm Interrupt Flag (AF)
- *         if ((v.byteValue() &amp; 0X20) != 0) {
- *             // Notify application of alarm
- *         }
- *     }
- * });
- * </pre>
- *
- * </blockquote>
- * <p />
- * Unless otherwise noted, passing a {@code null} argument to a constructor or method in any class
- * or interface in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
- *
- * @since 1.0
- */
-package jdk.dio.mmio;
-
--- a/src/share/classes/jdk/dio/dac/DACChannelConfig.java	Tue May 12 13:29:46 2015 +0300
+++ b/src/share/classes/jdk/dio/dac/DACChannelConfig.java	Wed May 13 14:55:29 2015 +0300
@@ -70,7 +70,7 @@
     private int controllerNumber = UNASSIGNED;
     private int resolution = UNASSIGNED;
     private int samplingInterval = UNASSIGNED;
-    private double scaleFactor = 1.0;
+    private Double scaleFactor = 1.0;
     private int outputBufferSize = UNASSIGNED;
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPinConfig.java	Tue May 12 13:29:46 2015 +0300
+++ b/src/share/classes/jdk/dio/gpio/GPIOPinConfig.java	Wed May 13 14:55:29 2015 +0300
@@ -162,7 +162,7 @@
     @apimarker.API("device-io_1.1_gpio")
     public static final class Builder {
 
-        private GPIOPinConfig instance = new GPIOPinConfig();
+        private final GPIOPinConfig instance = new GPIOPinConfig();
 
         /**
          * Creates a new {@code Builder} instance.
--- a/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Tue May 12 13:29:46 2015 +0300
+++ b/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Wed May 13 14:55:29 2015 +0300
@@ -91,7 +91,7 @@
     private GPIOPinConfig outputConfig;
     private int idleState = UNASSIGNED;
     private int pulsePeriod = UNASSIGNED;
-    private double scaleFactor = 1.0;
+    private Double scaleFactor = 1.0;
     private int pulseAlignment = UNASSIGNED;
     private int outputBufferSize = UNASSIGNED;