PicoDeviceDefinitionsExperimental.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /****************************************************************************
  2. *
  3. * Filename: PicoDeviceDefinitionsExperimental.h
  4. * Copyright: Pico Technology Limited 2016 - 2022
  5. * Description:
  6. *
  7. * This header contains definitions of enumerated types and structs which
  8. * are at the beta stage of development and their signatures may change.
  9. ****************************************************************************/
  10. #ifndef __PICODEVICEDEFINITIONSEXPERIMENTAL_H__
  11. #define __PICODEVICEDEFINITIONSEXPERIMENTAL_H__
  12. #include <stdint.h>
  13. /// <summary>
  14. /// Probe user action (only button press events supported for now). Other event types
  15. /// may be added in future to support new probes.
  16. /// </summary>
  17. typedef enum enPicoProbeUserAction
  18. {
  19. PICO_PROBE_BUTTON_PRESS, /// parameter struct -> PICO_PROBE_BUTTON_PRESS_PARAMETER
  20. } PICO_PROBE_USER_ACTION;
  21. /// <summary>
  22. /// The duration of the button press event.
  23. /// </summary>
  24. typedef enum enPicoProbeButtonPressType
  25. {
  26. PICO_PROBE_BUTTON_SHORT_DURATION_PRESS,
  27. PICO_PROBE_BUTTON_LONG_DURATION_PRESS,
  28. } PICO_PROBE_BUTTON_PRESS_TYPE;
  29. #pragma pack(push, 1)
  30. /// <summary>
  31. /// The parameter struct for a button press event, indicating which button was
  32. /// pressed (in case future probes have multiple) and the type of press.
  33. /// </summary>
  34. typedef struct tPicoProbeButtonPressParameter
  35. {
  36. uint8_t buttonIndex;
  37. PICO_PROBE_BUTTON_PRESS_TYPE buttonPressType;
  38. } PICO_PROBE_BUTTON_PRESS_PARAMETER;
  39. #pragma pack(pop)
  40. #endif