mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 12:33:42 +00:00
Add runtime support for the nRF52
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user