test: add _embdemo print test
This commit is contained in:
11
_embdemo/hello/main.go
Normal file
11
_embdemo/hello/main.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
func myprint(s string) {
|
||||
for i := 0; i < len(s); i++ {
|
||||
WriteByte(s[i])
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
myprint("hello world")
|
||||
}
|
||||
4
_embdemo/hello/uart.go
Normal file
4
_embdemo/hello/uart.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package main
|
||||
|
||||
//go:linkname WriteByte C.board_uart_write_char
|
||||
func WriteByte(b byte)
|
||||
Reference in New Issue
Block a user