亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? serialeeprom.java

?? 輕量嵌入JVM,可用于掌上設備手機等手持消息設備.
?? JAVA
字號:
/************************************************************************
This file is part of java core libraries for the simpleRTJ virtual machine.

This file is covered by the GNU GPL with the following exception:
  As a special exception, the copyright holders of this library give you permission
  to link this library with independent modules to produce an executable, regardless
  of the license terms of these independent modules, and to copy and distribute the
  resulting executable under terms of your choice, provided that you also meet, for
  each linked independent module, the terms and conditions of the license of that
  module. An independent module is a module which is not derived from or based on
  this library. If you modify this library, you may extend this exception to your
  version of the library, but you are not obligated to do so. If you do not wish
  to do so, delete this exception statement from your version.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL RTJ COMPUTING BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2000-2002 RTJ Computing Pty. Ltd. All rights reserved.
***********************************************************************/
package javax.memory;

/**
 * The instances of a SerialEEProm class can access data in the EEPROM memory
 * accessible via serial bus. <br>
 * Note: Native code routines do not provide any particular erase/write procedures as this
 * really depends on memory chips used. Software developer must modify appropriate routines
 * in the native code to implement correct programming algorithm.
 * <p>
 *
 * In order to use this class in your application follow the following steps:<br>
 *    1. Locate the SerialEEProm.c in the source/javax/memory/native directory<br>
 *    2. Copy this file into your project's native code directory and
 *       make it part of the native code building process.
 *    3. Implement programming algorithm specific to a serial EEPROM type used.
 */
public class SerialEEProm extends MemoryRegion
{
    /**
     * Creates a new SerialEEProm memory region object.
     *
     * @param start starting address of a new memory region.
     * @param length length of a new memory region.
     * @exception InvalidMemoryRegionException is thrown when the requested region
     *      is invalid, i.e. overlaps with some other memory regions or there is no
     *      physical memory at specified location.
     */
    public SerialEEProm(int start, int length) throws InvalidMemoryRegionException
    {
        super(start, length);
    }

    /**
     * Writes a <code>byte</code> into memory at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 1 if post-increment is enabled or -1 if
     * post-decrement is enabled.
     *
     * @param value  a byte value that will be written into memory. Only lower 8 bits are written.
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public void writeByte(int value) throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        writeByte0(regStart + memOffs, value);
        if (postIncrement)
            memOffs++;
        else if (postDecrement)
            memOffs--;
    }

    /**
     * Writes a <code>short</code> into memory at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 2 if post-increment is enabled or -2 if
     * post-decrement is enabled.
     *
     * @param value  a short value that will be written into memory. Only lower 16 bits are written.
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public void writeShort(int value) throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        writeByte0(regStart + memOffs, value >> 8);
        writeByte0(regStart + memOffs + 1, value);
        if (postIncrement)
            memOffs += 2;
        if (postDecrement)
            memOffs -= 2;
    }

    /**
     * Writes a <code>int</code> into memory at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 4 if post-increment is enabled or -4 if
     * post-decrement is enabled.
     *
     * @param value  a integer value (32 bit) that will be written into memory.
     * @exception RegionAddressOutOfBounds is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public void writeInt(int value) throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        writeInt0(regStart + memOffs, value >> 24);
        writeInt0(regStart + memOffs + 1, value >> 16);
        writeInt0(regStart + memOffs + 2, value >> 8);
        writeInt0(regStart + memOffs + 3, value);
        if (postIncrement)
            memOffs += 4;
        if (postDecrement)
            memOffs -= 4;
    }

    /**
     * Writes <code>byte</code> array to the memory starting at the current offset.
     * Method setOffset() should be called prior calling this method to setup the offset pointer.<br>
     * The offset pointer will be modified by the number of bytes written if post-increment
     * or post-decrement flag is set.
     *
     * @param array a source byte array
     * @param start starting offset in the array
     * @param length number of bytes to write
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     * @exception IndexOutOfBoundsException is thrown when trying to access array data that out of bounds
     *      of the input byte array.
     */
    public void writeBytes(byte[] array, int start, int length)
        throws RegionAddressOutOfBoundsException, IndexOutOfBoundsException
    {
        if (start + length > array.length)
            throw new IndexOutOfBoundsException();
        if (regStart + memOffs < regStart || regStart + memOffs + length >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        for (int i=0; i < length; i++)
            writeByte0(regStart + memOffs + i, array[start + i]);

        if (postIncrement)
            memOffs += length;
        if (postDecrement)
            memOffs -= length;
    }

    /**
     * Reads a <code>byte</code> from the memory region at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 1 if post-increment is enabled or -1 if
     * post-decrement is enabled.
     *
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public int readByte() throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        int retval = readByte0(regStart + memOffs);

        if (postIncrement)
            memOffs++;
        if (postDecrement)
            memOffs--;

        return retval;
    }

    /**
     * Reads a <code>short</code> from the memory region at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 2 if post-increment is enabled or -2 if
     * post-decrement is enabled.
     *
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public int readShort() throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        int retval = readByte0(regStart + memOffs) << 8;
        retval |= readByte0(regStart + memOffs + 1);

        if (postIncrement)
            memOffs += 2;
        if (postDecrement)
            memOffs -= 2;

        return retval;
    }

    /**
     * Reads a <code>int</code> from the memory region at current offset. Method setOffset()
     * should be called prior calling this method to setup the offset pointer.<br>
     * Offset pointer will be modified by 4 if post-increment is enabled or -4 if
     * post-decrement is enabled.
     *
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     */
    public int readInt() throws RegionAddressOutOfBoundsException
    {
        if (regStart + memOffs < regStart || regStart + memOffs >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        int retval = readByte0(regStart + memOffs) << 24;
        retval |= readByte0(regStart + memOffs + 1) << 16;
        retval |= readByte0(regStart + memOffs + 2) << 8;
        retval |= readByte0(regStart + memOffs + 3);

        if (postIncrement)
            memOffs += 4;
        if (postDecrement)
            memOffs -= 4;

        return retval;
    }

    /**
     * Reads <code>byte</code> values from the memory starting at the current offset to the
     * destination byte array.
     * Method setOffset() should be called prior calling this method to setup the offset pointer.<br>
     * The offset pointer will be modified by number of bytes read if post-increment
     * or post-decrement flag is set.
     *
     * @param array destination byte array
     * @param start starting offset in the array
     * @param length number of bytes to read
     * @exception RegionAddressOutOfBoundsException is thrown when trying to access data out of bounds
     *      of this memory region.
     * @exception IndexOutOfBoundsException is thrown when trying to access array data that out of bounds
     *      of the destination byte array.
     */
    public void readBytes(byte[] array, int start, int length)
        throws RegionAddressOutOfBoundsException, IndexOutOfBoundsException
    {
        if (start + length > array.length)
            throw new IndexOutOfBoundsException();
        if (regStart + memOffs < regStart || regStart + memOffs + length >= regEnd)
            throw new RegionAddressOutOfBoundsException();

        for (int i=0; i < length; i++)
            array[start + i] = (byte)readByte0(regStart + memOffs + i);

        if (postIncrement)
            memOffs += length;
        if (postDecrement)
            memOffs -= length;
    }

    /**
     * Verifies if the requested meory area is valid SerialEEProm memory area.
     *
     * @param start starting address of a new memory region.
     * @param length length of a new memory region.
     * @return true if memory region validity test passes, otherwise false is returned.
     */
    protected boolean regionOk(int start, int length)
    {
        return regionOk0(start, length);
    }

    /**
     * Verifies if the requested area is valid SerialEEProm memory region.
     * @param start starting address of a new memory region.
     * @param length length of a new memory region.
     * @return true if memory region validity test passes, otherwise false is returned.
     */
    protected static native boolean regionOk0(int start, int length);

    /*
     * Native methods that write/read 8 bit values into/from serial EEProm.
     */
    protected static native boolean writeByte0(int Address, int Value);
    protected static native int readByte0(int Address);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲123区在线观看| 久久久久青草大香线综合精品| 国产精品免费久久| 成人激情视频网站| 亚洲美女一区二区三区| 欧美午夜片在线观看| 日韩二区三区在线观看| 欧美v亚洲v综合ⅴ国产v| 精品一区二区国语对白| 久久精品一区蜜桃臀影院| 不卡电影一区二区三区| 亚洲激情图片qvod| 欧美精品vⅰdeose4hd| 日本中文字幕一区二区有限公司| 欧美精品一区二区久久婷婷| 美女高潮久久久| 国产一本一道久久香蕉| 麻豆精品视频在线| 国产一区二区在线电影| 国产伦理精品不卡| 日韩影院免费视频| 国产伦精品一区二区三区免费 | 国产精品久久久久久久久图文区| 99久久国产综合色|国产精品| 亚洲一区二区三区视频在线| 777精品伊人久久久久大香线蕉| 国内精品自线一区二区三区视频| 亚洲天堂成人在线观看| 欧美精品亚洲一区二区在线播放| 国产精品77777| 亚洲午夜电影在线| 国产午夜精品久久久久久久| 在线亚洲一区二区| 国产在线播放一区| 亚洲午夜在线观看视频在线| 精品国产sm最大网站| 一本色道久久综合精品竹菊| 久久99这里只有精品| 亚洲欧美日韩中文字幕一区二区三区| 欧美一区二区三区色| jlzzjlzz亚洲日本少妇| 免费观看一级特黄欧美大片| 亚洲色图视频网| 精品国产免费一区二区三区四区| 一本大道久久a久久精品综合 | 国产又黄又大久久| 亚洲一区在线视频| 日本一区二区三区dvd视频在线 | 日本韩国欧美在线| 国产成人免费网站| 青青青伊人色综合久久| 亚洲精品乱码久久久久久黑人| 久久色中文字幕| 色婷婷亚洲一区二区三区| 国产精品一区在线| 免费成人av在线| 亚洲午夜久久久久中文字幕久| 国产日产欧美一区| 日韩欧美国产一区二区三区| 在线免费不卡电影| 99久久综合国产精品| 国产精品一区在线观看乱码| 久久国内精品自在自线400部| 国产精品1区2区3区在线观看| 日韩成人一级片| 亚洲一区二区在线免费观看视频 | 亚洲精品国产成人久久av盗摄| 久久精品人人做人人综合| 精品欧美一区二区在线观看| 制服丝袜亚洲色图| 欧美丰满少妇xxxbbb| 欧美性xxxxx极品少妇| 在线亚洲欧美专区二区| 国产剧情在线观看一区二区| 亚洲精品日日夜夜| 夜夜嗨av一区二区三区中文字幕| 91一区二区三区在线播放| 久久99久久精品| 亚洲六月丁香色婷婷综合久久| 国产精品女主播av| 一区二区欧美国产| 蜜桃av一区二区三区电影| 国产一区二区在线免费观看| 成人精品国产一区二区4080| 色哟哟亚洲精品| 这里是久久伊人| 久久一区二区三区四区| 中文字幕av一区 二区| 欧美日韩亚洲不卡| 天天色图综合网| 亚洲午夜久久久久| 日本vs亚洲vs韩国一区三区二区 | 7777精品伊人久久久大香线蕉的| 在线成人小视频| 精品乱人伦小说| 国产三级欧美三级日产三级99| 日本一区二区三区在线观看| 中文字幕一区二区三区四区不卡 | 五月婷婷激情综合| 丝瓜av网站精品一区二区| 美国十次综合导航| 国产jizzjizz一区二区| www.色精品| 欧美日韩国产小视频| 欧美大片一区二区三区| 亚洲国产精品成人久久综合一区| 亚洲三级在线观看| 日本三级亚洲精品| 懂色中文一区二区在线播放| 不卡在线观看av| 欧美喷潮久久久xxxxx| 日韩精品一区二区三区四区视频| 欧美激情一区三区| 亚洲国产精品综合小说图片区| 99精品欧美一区二区三区小说| 91成人在线免费观看| 欧美一级一级性生活免费录像| 日本一区二区三级电影在线观看| 一区二区三区**美女毛片| 青青草原综合久久大伊人精品优势| 高清av一区二区| 欧美伦理电影网| 国产精品久久久久婷婷| 欧美a一区二区| 91最新地址在线播放| 日韩午夜av一区| 一区二区三区在线视频免费观看| 捆绑调教一区二区三区| 91激情在线视频| 国产免费观看久久| 日本成人在线一区| 日本韩国欧美三级| 国产欧美一区二区精品婷婷| 日韩精品1区2区3区| 色综合久久天天| 久久久久国产免费免费| 五月天中文字幕一区二区| 成人午夜视频在线观看| 日韩午夜在线观看视频| 一区二区三区.www| a4yy欧美一区二区三区| 久久影院电视剧免费观看| 天天综合色天天综合色h| 99久久99精品久久久久久| 2019国产精品| 美国精品在线观看| 欧美日韩精品欧美日韩精品| 中文字幕一区在线观看| 精品一区二区三区免费视频| 欧美无砖专区一中文字| 亚洲精品视频一区二区| 99久久精品99国产精品| 国产日韩v精品一区二区| 久久精品久久精品| 日韩一级大片在线| 肉肉av福利一精品导航| 欧美性大战久久久久久久| 亚洲欧美色图小说| 91色婷婷久久久久合中文| 中文在线资源观看网站视频免费不卡 | 免费日韩伦理电影| 欧美日韩一区二区三区四区五区| 亚洲人精品午夜| 91女厕偷拍女厕偷拍高清| 国产精品麻豆一区二区| 高清不卡在线观看| 中文字幕av一区二区三区免费看| 国产91在线观看| 中文字幕第一区| av福利精品导航| 亚洲精品久久7777| 欧洲激情一区二区| 午夜电影一区二区| 91精品国产综合久久福利软件| 日本成人在线看| 精品欧美一区二区三区精品久久| 精品在线你懂的| 久久久久9999亚洲精品| 国产高清在线精品| 国产精品久久一卡二卡| 99亚偷拍自图区亚洲| 一区二区三区在线免费播放| 欧美性生活影院| 日韩精品一二三区| 日韩欧美中文一区| 国产伦精品一区二区三区免费迷 | 精品国产123| 国产精品中文有码| 1024国产精品| 欧美日韩综合在线免费观看| 午夜精品国产更新| 精品久久久久久久一区二区蜜臀| 成人涩涩免费视频| 亚洲影院免费观看| 91麻豆精品91久久久久久清纯| 国产乱子伦视频一区二区三区 | 免费高清在线视频一区·| 久久久91精品国产一区二区精品| www.色综合.com| 免费观看在线综合|