This file contains 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
package main | |
import ( | |
"fmt" | |
"image/color" | |
"strings" | |
"time" | |
"golang.org/x/image/bmp" |
This file contains 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
//go:build wioterminal | |
// +build wioterminal | |
package main | |
import ( | |
"device/sam" | |
"machine" | |
"runtime/interrupt" | |
"time" |
This file contains 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
;#IfWinActive Adobe Acrobat Reader DC | |
#IfWinActive Adobe Acrobat Reader (64-bit) | |
^c:: | |
Send, ^c | |
ClipWait | |
x = %clipboard% | |
space := " " | |
StringReplace, x, x, .`r`n, .`r, All | |
StringReplace, x, x, :`r`n, :`r, All | |
StringReplace, x, x, `r`n, %space%, All |
This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "cortex-debug", | |
"servertype": "openocd", | |
"request": "launch", | |
"name": "tinygo-debug", | |
"runToEntryPoint": "main.main", | |
"executable": "${workspaceRoot}/out.elf", |
This file contains 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
package main | |
import ( | |
"device/sam" | |
"log" | |
"machine" | |
"time" | |
) | |
func main() { |
This file contains 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
//go:build !baremetal | |
// +build !baremetal | |
package main | |
import ( | |
"image/color" | |
"image/png" | |
"log" | |
"os" |
This file contains 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
package main | |
import ( | |
"machine" | |
"time" | |
) | |
var ( | |
usbcdc = machine.USB |
This file contains 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
package main | |
import ( | |
"image/color" | |
"time" | |
"github.com/boombuler/barcode" | |
"github.com/boombuler/barcode/qr" | |
"tinygo.org/x/tinyfont" | |
"tinygo.org/x/tinyfont/freemono" |
This file contains 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
diff --git a/.vscode/settings.json b/.vscode/settings.json | |
new file mode 100644 | |
index 0000000..a8e65e5 | |
--- /dev/null | |
+++ b/.vscode/settings.json | |
@@ -0,0 +1,6 @@ | |
+{ | |
+ "go.toolsEnvVars": { | |
+ "GOROOT": "/home/tobias/.cache/tinygo/goroot-go1.16-65176e9981f9146086a1cca207bd1d47f4da8a15455d548a5d84fac12d1814d2-syscall", | |
+ "GOFLAGS": "-tags=arduino_nano33,atsamd21g18a,atsamd21g18,atsamd21,sam,cortexm,baremetal,linux,arm,tinygo,gc.conservative,scheduler.tasks" |
This file contains 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
function! s:ChangeTinygoTargetTo(target) | |
let info = split(system('tinygo info -target ' . a:target), "\n") | |
for i in info | |
let data = split(i) | |
if len(data) > 2 && data[0] == "build" && data[1] == "tags:" | |
let s:goflags = "-tags=" . join(data[2:-1], ",") | |
elseif len(data) > 2 && data[0] == "cached" && data[1] == "GOROOT:" | |
let s:goroot = join(data[2:-1], ",") | |
endif | |
endfor |