Add runtime support for the nRF52

This commit is contained in:
Ayke van Laethem
2018-04-25 20:06:08 +02:00
parent e80f06bc5e
commit 04fef19753
13 changed files with 113 additions and 22 deletions
+23
View File
@@ -0,0 +1,23 @@
// +build linux
package runtime
// #include <stdio.h>
// #include <stdlib.h>
// #include <unistd.h>
import "C"
const Microsecond = 1
func putchar(c byte) {
C.putchar(C.int(c))
}
func Sleep(d Duration) {
C.usleep(C.useconds_t(d))
}
func abort() {
C.abort()
}