Пример #1
0
        public static void DeserializeFromUART <T>(
            ref T obj,
            FPGA.InputSignal <bool> RXD,
            FPGA.Signal <bool> deserialized) where T : new()
        {
            byte data = 0;

            FPGA.Config.JSONDeserializer(obj, data, deserialized);

            const bool trigger     = true;
            Sequential uartHandler = () =>
            {
                while (true)
                {
                    data = UART.Read(115200, RXD);
                }
            };

            FPGA.Config.OnSignal(trigger, uartHandler);
        }