Example #1
0
        public virtual void Write16(int offset, ushort value)
        {
            if ((offset & 0x1) != 0)
            {
                throw new Exception("BAD_OFFSET");
            }

            uint config = (((uint)offset & 0xfc) |
                           ((uint)identifier << 8) |
                           ((uint)1 << 31));

            addressPort.Write32(config);
            dataPort.Write16((uint)(offset & 0x2), value);
        }