|
- #ifndef PLSR_CORE_H
- #define PLSR_CORE_H
-
- #include "plsr_job.h"
- #include "plsr_types.h"
- #include <stdint.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- PLSR_RESULT PlsrInit(void);
- void PlsrTask(void *argument);
- void PlsrProcess(void);
- void PlsrControlTick100us(void);
- void PlsrSetControlTickHook(void (*hook)(void));
-
- PLSR_RESULT PlsrPostCall(const PLSR_CALL *call);
- /* Side-effect-free COMMIT validation. It parses the complete S0/S1/S2/D
- * model but does not reserve resources or start an axis. */
- PLSR_RESULT PlsrValidateCall(const PLSR_CALL *call,
- PLSR_PARSE_DETAIL *detail);
- PLSR_RESULT PlsrPostCommand(const PLSR_COMMAND *command);
- PLSR_RESULT PlsrPostEvent(uint8_t axis, uint32_t eventMask);
- PLSR_RESULT PlsrGetStatus(uint8_t axis, PLSR_STATUS *status);
- PLSR_RESULT PlsrGetLastParseDetail(uint8_t axis,
- PLSR_PARSE_DETAIL *detail);
-
- #ifdef PLSR_HOST_TEST
- /* 仅测试使用的低层启动入口:不解析 S0/S1/S2/D,直接申请资源进入 ACCEL。
- * 生产调用必须使用 PlsrPostCall()。 */
- PLSR_RESULT PlsrPostStart(const PLSR_START_REQUEST *request);
- uint32_t PlsrTestGetProfileRefreshHz(uint8_t axis);
- uint8_t PlsrTestGetProfileActive(uint8_t axis);
- uint8_t PlsrTestGetJobRefreshCode(uint8_t axis);
- uint32_t PlsrTestGetProfileFrequencyHz(uint8_t axis);
- #endif
-
- PLSR_RESULT PlsrStateTransition(uint8_t axis,
- PLSR_STATE target,
- PLSR_TRANSITION_REASON reason);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* PLSR_CORE_H */
|