This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <WProgram.h> | |
| #include <usb_serial.h> | |
| #include <usb_joystick.h> | |
| #include <joystick-input.h> | |
| int main() { | |
| pinMode(13, OUTPUT); | |
| Joystick.useManualSend(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DeriveDataTypeable #-} | |
| module Main where | |
| import Control.Applicative | |
| import Control.Concurrent(forkIO) | |
| import Control.Monad hiding(mapM) | |
| import Control.Monad.IO.Class | |
| import qualified Data.ByteString as B (putStr, pack, length) | |
| import Data.ByteString.Lazy (toStrict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE RecordWildCards #-} | |
| module Joystick ( | |
| JoystickState(..), | |
| joystickSource, | |
| selectJoystick, | |
| withJoystickOr, | |
| getJoystickNames, | |
| ) where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DeriveDataTypeable #-} | |
| module Main where | |
| import Data.Data | |
| import System.Console.CmdArgs | |
| data FooBar = Foo { fooArg :: Int} | |
| | Bar { barArg :: Int} | |
| deriving (Show, Data, Typeable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clang | |
| -L../gcc-arm-none-eabi/lib/gcc/arm-none-eabi/4.9.3/ | |
| -L../gcc-arm-none-eabi/arm-none-eabi/lib | |
| -lc | |
| -Wall | |
| -Wno-multichar | |
| -Os | |
| -mcpu=cortex-m4 | |
| -mthumb | |
| -m32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # clang++ (for build/src/main.cpp.o) | |
| # clang++ (for build/src/Uplink.cpp.o) | |
| # clang++ (for build/src/Joystick.cpp.o) | |
| # clang++ (for build/src/FlightData.cpp.o) | |
| # clang++ (for build/src/Assert.cpp.o) | |
| # clang++ (for build/i2c_t3/i2c_t3.cpp.o) | |
| # clang++ (for build/cores/teensy3/yield.cpp.o) | |
| # clang (for build/cores/teensy3/usb_serial.c.o) | |
| # clang (for build/cores/teensy3/usb_seremu.c.o) | |
| # clang (for build/cores/teensy3/usb_rawhid.c.o) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cabal install | |
| Some add-source dependencies have been modified. They will be reinstalled... | |
| Resolving dependencies... | |
| In order, the following will be installed: | |
| sdl2-2.0.0 (reinstall) | |
| jpl-0.1.0.0 (new package) | |
| Warning: Note that reinstalls are always dangerous. Continuing anyway... | |
| Notice: installing into a sandbox located at | |
| C:\Users\jophish\projects\a-crummiest-nth-loop\jpl\.cabal-sandbox | |
| Configuring sdl2-2.0.0... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cabal exec -- ghc --make Main.hs -fforce-recomp | |
| [1 of 4] Compiling Uplink ( Uplink.hs, Uplink.o ) | |
| [2 of 4] Compiling FlightData ( FlightData.hs, FlightData.o ) | |
| Loading package ghc-prim ... linking ... done. | |
| Loading package integer-gmp ... linking ... done. | |
| Loading package base ... linking ... done. | |
| [3 of 4] Compiling Joystick ( Joystick.hs, Joystick.o ) | |
| [4 of 4] Compiling Main ( Main.hs, Main.o ) | |
| Linking Main.exe ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ konsole | |
| QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. | |
| Could not find drkonqi at /usr/lib/x86_64-linux-gnu/libexec/drkonqi | |
| cannot find .rc file "konsoleui.rc" for component "konsole" | |
| QFSFileEngine::open: No file name specified | |
| Unable to load translator "default" | |
| QFSFileEngine::open: No file name specified | |
| Unable to load translator "default" | |
| Could not find color scheme - "Linux" | |
| cannot find .rc file "sessionui.rc" for component "konsole" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| module SAT where | |
| import CLaSH.Prelude | |
| imageSize = 64 | |
| -- From https://github.com/clash-lang/clash-prelude/issues/42 |