Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

55 řádky
1.2 KiB

  1. #ifndef PLSR_INTERNAL_H
  2. #define PLSR_INTERNAL_H
  3. #include <stdint.h>
  4. #define PLSR_SEGMENT_COUNT_MAX (10U)
  5. #define PLSR_FREQUENCY_MAX_HZ (100000UL)
  6. #define PLSR_OUTPUT_PULSE_DIR (0U)
  7. #define PLSR_OUTPUT_AB (1U)
  8. typedef struct
  9. {
  10. uint32_t frequencyHz;
  11. int32_t pulses;
  12. uint16_t waitType;
  13. uint16_t waitTimeMs;
  14. uint16_t actTimeMs;
  15. uint16_t jumpSegment;
  16. } PLSR_SEGMENT_CONFIG;
  17. typedef struct
  18. {
  19. uint16_t pulseOutput;
  20. uint16_t directionOutput;
  21. uint16_t waitInput;
  22. uint16_t extInput;
  23. uint16_t sendMode;
  24. uint16_t directionDelayMs;
  25. uint16_t directionNegativeLogic;
  26. uint16_t curveMode;
  27. uint16_t positionMode;
  28. uint16_t segmentCount;
  29. uint16_t startSegment;
  30. uint32_t defaultSpeedHz;
  31. uint32_t startSpeedHz;
  32. uint32_t stopSpeedHz;
  33. uint16_t accelerationTimeMs;
  34. uint16_t decelerationTimeMs;
  35. PLSR_SEGMENT_CONFIG segments[PLSR_SEGMENT_COUNT_MAX];
  36. /* Kept at the end so version-2 persisted configurations remain a prefix. */
  37. uint16_t outputMode;
  38. } PLSR_CONFIG;
  39. typedef struct
  40. {
  41. PLSR_CONFIG config;
  42. int32_t position;
  43. uint8_t positionValid;
  44. uint8_t wasBusy;
  45. uint16_t reserved;
  46. } PLSR_PERSIST_PAYLOAD;
  47. #endif /* PLSR_INTERNAL_H */