Skip to content

Instantly share code, notes, and snippets.

@deadprogram
Last active December 11, 2018 10:20
Show Gist options
  • Save deadprogram/4e7b27d39b10f963070334ca4db32357 to your computer and use it in GitHub Desktop.
Save deadprogram/4e7b27d39b10f963070334ca4db32357 to your computer and use it in GitHub Desktop.
TinyGo with CGo including MDK
#include "nrf.h"
#include "mdktest.h"
int mdk_major_version()
{
return MDK_MAJOR_VERSION;
}
int mdk_minor_version()
{
return MDK_MINOR_VERSION;
}
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)
}
}
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