public static void ReportState( GameControlsState controlsState, eDirectionType nextDirectionFromKeypad, eDirectionType nextDirectionFromJoystick, eDirectionType nextDirection, FPGA.Signal <bool> TXD ) { SnakeDBG dbg = new SnakeDBG(); dbg.C1 = controlsState.adcChannel1; dbg.C2 = controlsState.adcChannel2; dbg.KD = nextDirectionFromKeypad; dbg.JD = nextDirectionFromJoystick; dbg.ND = nextDirection; JSON.SerializeToUART(ref dbg, TXD); }
public static async Task Aggregator( // blinker FPGA.OutputSignal <bool> LED1, // UART FPGA.InputSignal <bool> RXD, FPGA.OutputSignal <bool> TXD ) { IsAlive.Blink(LED1); SnakeDBG dbg = new SnakeDBG(); Sequential handler = () => { dbg.C1++; JSON.SerializeToUART(ref dbg, TXD); }; FPGA.Config.OnStartup(handler); }