ps6000aApiExperimental.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /****************************************************************************
  2. *
  3. * Filename: ps6000aApiExperimental.h
  4. * Copyright: Pico Technology Limited 2002 - 2022
  5. * Description:
  6. *
  7. * This header defines the interface to driver routines for the
  8. * PicoScope 6000 range of PC Oscilloscopes.
  9. *
  10. * These functions are at the beta stage of development and their
  11. * signatures may change.
  12. *
  13. ****************************************************************************/
  14. #ifndef __PS6000AAPIEXPERIMENTAL_H__
  15. #define __PS6000AAPIEXPERIMENTAL_H__
  16. #include "ps6000aApi.h"
  17. #include "PicoCallback.h"
  18. #include "PicoDeviceDefinitionsExperimental.h"
  19. #include <stdint.h>
  20. typedef void (PREF4 *ps6000aDigitalPortInteractions)
  21. (
  22. int16_t handle,
  23. PICO_STATUS status,
  24. PICO_DIGITAL_PORT_INTERACTIONS * ports,
  25. uint32_t nPorts
  26. );
  27. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetDigitalPortInteractionCallback)
  28. (
  29. int16_t handle,
  30. ps6000aDigitalPortInteractions callback
  31. );
  32. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetProbeInteractionCallback)
  33. (
  34. int16_t handle,
  35. PicoProbeInteractions callback
  36. );
  37. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetExternalReferenceInteractionCallback)
  38. (
  39. int16_t handle,
  40. PicoExternalReferenceInteractions callback
  41. );
  42. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetAWGOverrangeInteractionCallback)
  43. (
  44. int16_t handle,
  45. PicoAWGOverrangeInteractions callback
  46. );
  47. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetTemperatureSensorInteractionCallback)
  48. (
  49. int16_t handle,
  50. PicoTemperatureSensorInteractions callback
  51. );
  52. /// <summary>
  53. /// Callback signature for a probe user action notification (not to be confused with
  54. /// the connection / fault status change which is notified via PicoProbeInteractions).
  55. /// </summary>
  56. /// <param name="handle">The handle to the device to which the probe is attached.</param>
  57. /// <param name="status">
  58. /// Indicates if anything went wrong while handling the probe event
  59. /// (e.g. probe signaled an interrupt, but then communication with the probe failed).</param>
  60. /// <param name="channel">The channel to which the probe was attached that signaled
  61. /// the interrupt.
  62. /// </param>
  63. /// <param name="probe">The type of probe connected to the channel.</param>
  64. /// <param name="action">The probe action which the user performed.</param>
  65. /// <param name="pActionParameter">
  66. /// A pointer to a struct containing the parameters for
  67. /// the action, (e.g. in case of PICO_PROBE_BUTTON_PRESS, this is a
  68. /// PICO_PROBE_BUTTON_PRESS_PARAMETER *).
  69. /// </param>
  70. /// <param name="pParameter">A pointer to the user parameter given when setting the callback.</param>
  71. typedef void(PREF5* PicoProbeUserAction)(int16_t handle,
  72. PICO_STATUS status,
  73. PICO_CHANNEL channel,
  74. PICO_CONNECT_PROBE probe,
  75. PICO_PROBE_USER_ACTION action,
  76. PICO_POINTER pActionParameter,
  77. PICO_POINTER pParameter);
  78. /// <summary>
  79. /// Sets a callback for probe-specific user actions (such as button-press events).
  80. /// Note that ps6000aSetProbeInteractionCallback must have already been called before calling this
  81. /// function. Also note that like all other user callbacks (probe arrival / status, MSO arrival,
  82. /// temperature, external reference, AWG overrange), this callback will occur on the user interaction
  83. /// event loop, so it is guaranteed not to be invoked concurrently with any others. The parameter
  84. /// pointer will be passed back to the user via the last argument on the callback on subsequent
  85. /// invocations.
  86. /// </summary>
  87. /// <param name="handle">The handle to the device to which the probe is attached.</param>
  88. /// <param name="callback">A pointer to the callback function.</param>
  89. /// <param name="pParameter">A pointer to the user data.</param>
  90. /// <returns>
  91. /// A status indicating whether the callback was configured successfully. Possible errors:
  92. /// PICO_INVALID_HANDLE - the given handle is unknown to the driver or has been closed
  93. /// PICO_DRIVER_FUNCTION - a driver function has been called on another thread
  94. /// PICO_NOT_SUPPORTED_BY_THIS_DEVICE - the device associated with this handle does not support
  95. /// intelligent probes
  96. /// PICO_PROBE_COLLECTION_NOT_STARTED - no probe interaction callback is currently set
  97. /// </returns>
  98. PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps6000aSetProbeUserActionCallback) (
  99. int16_t handle,
  100. PicoProbeUserAction callback,
  101. PICO_POINTER pParameter
  102. );
  103. #endif