直接上代碼:
C#代碼:
static extern int app_cc1125_spi_init();
[DllImport("cc1125_demo_app.dll", EntryPoint = "app_cc1125_device_open")]
static void Main(string[] args)
{
app_cc1125_device_open();
}
C#呼叫dll編譯好demo之后在linux下運行結果和原生c代碼運行結果不一樣,呼叫的這個函式是打開spi口,原生c代碼這個函式可以正常打開spi口,C#呼叫C封裝好的dll庫就打不開。求解!!!!!!!!
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/34593.html
標籤:C#
