diff --git a/index.html b/index.html index 6933f5b..792f0ae 100644 --- a/index.html +++ b/index.html @@ -81,6 +81,75 @@
I find it a useful tool. Maybe you will, too! +
+ {(long)Registers.RxTx, new DoubleWordRegister(this)
+ .WithValueField(0, 8,
+ writeCallback: (_, value) => {
+ this.TransmitCharacter((byte)value);
+ },
+ valueProviderCallback: _ => {
+ if(!TryGetCharacter(out var character))
+ {
+ this.Log(LogLevel.Warning, "Empty Rx FIFO.");
+ }
+ return character;
+ })
+ },
+
+
+ *** Test Cases ***
+ Should Read Acceleration
+ Create Machine
+ Create Terminal Tester ${UART}
+
+ Execute Command sysbus.twi1.lis2ds12 AccelerationX 10
+ Execute Command sysbus.twi1.lis2ds12 AccelerationY 5
+ Execute Command sysbus.twi1.lis2ds12 AccelerationZ -5
+
+ Start Emulation
+
+ Wait For Line On Uart x 9.997213 , y 4.997410 , z -4.999803
+
+