示例#1
0
        //--------
        //-------- Custom Methods for this 1-Wire Device Type
        //--------

        /// <summary> Query to see if current memory bank is write write once such
        /// as with EPROM technology.
        ///
        /// </summary>
        /// <returns>  'true' if current memory bank can only be written once
        /// </returns>
        public virtual bool isPageWriteOnce(int page)
        {
            byte[] rd_byte = new byte[1];

            register.read(page, false, rd_byte, 0, 1);

            return(rd_byte[0] == WRITEONCE_FLAG);
        }
示例#2
0
        /// <summary> Query to see if the specified page is locked.
        /// See the method 'canLockPage()'.
        ///
        /// </summary>
        /// <param name="page"> number of page to see if locked
        ///
        /// </param>
        /// <returns>  'true' if page locked.
        ///
        /// </returns>
        /// <throws>  OneWireIOException </throws>
        /// <throws>  OneWireException </throws>
        public virtual bool isPageLocked(int page)
        {
            byte[] rd_byte = new byte[1];

            mbLock.read(page, false, rd_byte, 0, 1);

            return(rd_byte[0] == LOCKED_FLAG);
        }