Ejemplo n.º 1
0
        public async Task Bmi160SpiDataAsync()
        {
            byte[] expected = new byte[] { 0x07, 0x30, 0x81, 0x0b, 0xc0 };
            byte[] actual   = null;

            await spi.AddRouteAsync(source => source.Stream(data => actual = data.Value <byte[]>()));

            platform.sendMockResponse(new byte[] { 0x0d, 0x82, 0x0e, 0x07, 0x30, 0x81, 0x0b, 0xc0 });

            platform.fileSuffix = "spi_stream";
            await metawear.SerializeAsync();

            Assert.That(actual, Is.EqualTo(expected));
        }