Exemplo n.º 1
0
        /// <summary>
        ///     Display the registers.
        /// </summary>
        public void DisplayRegisters()
        {
            var data = new byte[0x12];

            _ds323x.WriteRead(new byte[] { 0 }, data);
            DebugInformation.DisplayRegisters(0, data);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Dump the registers to the debug output stream.
        /// </summary>
        public void DisplayRegisters()
        {
            var registers = new byte[29];

            adxl345.WriteRead(new byte[] { Registers.TAPThreshold }, registers);
            DebugInformation.DisplayRegisters(Registers.TAPThreshold, registers);
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Display the register contents.
        /// </summary>
        public void DisplayRegisters()
        {
            var command     = new byte[] { Command.Readegister, 0x00 };
            var registers   = _adxl362.WriteRead(command, 6);
            var idRegisters = new byte[4];

            Array.Copy(registers, 2, idRegisters, 0, 4);
            DebugInformation.DisplayRegisters(0x00, idRegisters);
            command[1] = Registers.XAxis8Bits;
            var amount = Registers.SelfTest - Registers.XAxis8Bits + 1;

            registers = _adxl362.WriteRead(command, (ushort)(amount + 2));
            var dataRegisters = new byte[amount];

            Array.Copy(registers, 2, dataRegisters, 0, amount);
            DebugInformation.DisplayRegisters(Registers.XAxis8Bits, dataRegisters);
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Sensor has generated an interrupt, work out what to do.
        /// </summary>
        //private void InterruptChanged(object sender, DigitalInputPortEventArgs e)
        //{

        //}

        /// <summary>
        ///     Display the register contents.
        /// </summary>
        private void DisplayRegisters()
        {
            var command   = new byte[] { Command.Readegister, 0x00 };
            var registers = new byte[6];

            _adxl362.TransferFullDuplex(command, registers);
            var idRegisters = new byte[4];

            Array.Copy(registers, 2, idRegisters, 0, 4);
            DebugInformation.DisplayRegisters(0x00, idRegisters);
            command[1] = Registers.XAxis8Bits;
            var amount = Registers.SelfTest - Registers.XAxis8Bits + 1;

            registers = new byte[(ushort)(amount + 2)];
            _adxl362.TransferFullDuplex(command, registers);
            var dataRegisters = new byte[amount];

            Array.Copy(registers, 2, dataRegisters, 0, amount);
            DebugInformation.DisplayRegisters(Registers.XAxis8Bits, dataRegisters);
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Dump the registers to the debug output stream.
        /// </summary>
        public void DisplayRegisters()
        {
            var registers = adxl345.ReadRegisters(Registers.TAPThreshold, 29);

            DebugInformation.DisplayRegisters(Registers.TAPThreshold, registers);
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Display the registers.
        /// </summary>
        public void DisplayRegisters()
        {
            var data = _ds323x.ReadRegisters(0, 0x12);

            DebugInformation.DisplayRegisters(0, data);
        }