LocalArmbandInterface.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Runtime.InteropServices;
  7. namespace SketchAssistantWPF
  8. {
  9. class LocalArmbandInterface
  10. {
  11. [DllImport (@"../Debug/StaticLibMotors.dll", EntryPoint = "?setupArmband@ArmbandInterface@@QAAHXZ",
  12. CallingConvention = CallingConvention.Cdecl)]
  13. public static extern int setupArmband();
  14. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?startVibrate@ArmbandInterface@@QAAXHM@Z",
  15. CallingConvention = CallingConvention.Cdecl)]
  16. public static extern void startVibrate(int motorNumber, float intensity);
  17. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?stopVibrate@ArmbandInterface@@QAAXH@Z",
  18. CallingConvention = CallingConvention.Cdecl)]
  19. public static extern void stopVibration(int motorNumber);
  20. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate@ArmbandInterface@@QAAXHNH@Z",
  21. CallingConvention = CallingConvention.Cdecl)]
  22. public static extern void actuate(int motorNumber, double intensity, int duration);
  23. //public void Vibrate()
  24. }
  25. }