You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.5 KiB

  1. #ifndef PLSR_CORE_H
  2. #define PLSR_CORE_H
  3. #include "plsr_job.h"
  4. #include "plsr_types.h"
  5. #include <stdint.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. PLSR_RESULT PlsrInit(void);
  10. void PlsrTask(void *argument);
  11. void PlsrProcess(void);
  12. void PlsrControlTick100us(void);
  13. void PlsrSetControlTickHook(void (*hook)(void));
  14. PLSR_RESULT PlsrPostCall(const PLSR_CALL *call);
  15. /* Side-effect-free COMMIT validation. It parses the complete S0/S1/S2/D
  16. * model but does not reserve resources or start an axis. */
  17. PLSR_RESULT PlsrValidateCall(const PLSR_CALL *call,
  18. PLSR_PARSE_DETAIL *detail);
  19. PLSR_RESULT PlsrPostCommand(const PLSR_COMMAND *command);
  20. PLSR_RESULT PlsrPostEvent(uint8_t axis, uint32_t eventMask);
  21. PLSR_RESULT PlsrGetStatus(uint8_t axis, PLSR_STATUS *status);
  22. PLSR_RESULT PlsrGetLastParseDetail(uint8_t axis,
  23. PLSR_PARSE_DETAIL *detail);
  24. #ifdef PLSR_HOST_TEST
  25. /* 仅测试使用的低层启动入口:不解析 S0/S1/S2/D,直接申请资源进入 ACCEL。
  26. * 生产调用必须使用 PlsrPostCall()。 */
  27. PLSR_RESULT PlsrPostStart(const PLSR_START_REQUEST *request);
  28. uint32_t PlsrTestGetProfileRefreshHz(uint8_t axis);
  29. uint8_t PlsrTestGetProfileActive(uint8_t axis);
  30. uint8_t PlsrTestGetJobRefreshCode(uint8_t axis);
  31. uint32_t PlsrTestGetProfileFrequencyHz(uint8_t axis);
  32. #endif
  33. PLSR_RESULT PlsrStateTransition(uint8_t axis,
  34. PLSR_STATE target,
  35. PLSR_TRANSITION_REASON reason);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /* PLSR_CORE_H */