Last active
December 11, 2018 10:20
-
-
Save deadprogram/4e7b27d39b10f963070334ca4db32357 to your computer and use it in GitHub Desktop.
TinyGo with CGo including MDK
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
#include "nrf.h" | |
#include "mdktest.h" | |
int mdk_major_version() | |
{ | |
return MDK_MAJOR_VERSION; | |
} | |
int mdk_minor_version() | |
{ | |
return MDK_MINOR_VERSION; | |
} |
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 | |
/* | |
#include "mdktest.h" | |
*/ | |
import "C" | |
import "time" | |
func main() { | |
for { | |
println(C.mdk_major_version(), C.mdk_minor_version()) | |
time.Sleep(time.Second) | |
} | |
} |
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
int mdk_major_version(void); | |
int mdk_minor_version(void); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment