test: fix _embdemo
This commit is contained in:
16
_embdemo/hello-esp32/main.go
Normal file
16
_embdemo/hello-esp32/main.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "github.com/goplus/lib/c"
|
||||
|
||||
func myprint(s *c.Char) {
|
||||
for i := 0; i < int(c.Strlen(s)); i++ {
|
||||
WriteByte(byte(c.Index(s, i)))
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
for {
|
||||
myprint(c.Str("hello world"))
|
||||
sleep(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user