Er_sentry/User/device/AT9S_Pro(1).h
2025-10-17 20:03:28 +08:00

67 lines
1.9 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// #pragma once
// #ifdef __cplusplus
// extern "C" {
// #endif
// /* Includes ----------------------------------------------------------------- */
// #include <cmsis_os2.h>
// #include "component/user_math.h"
// #include "device.h"
// /* Exported constants ------------------------------------------------------- */
// #define DEVICE_AT9S_FRAME_LEN 25u
// /* Exported types ----------------------------------------------------------- */
// typedef __packed struct
// {
// int16_t ch[4]; /* 摇杆原始值 */
// int16_t sw[8]; /* 开关/旋钮原始值 */
// } DEVICE_AT9S_Raw_t;
// /* 拨杆位置 */
// typedef enum {
// AT9S_CMD_SW_ERR = 0,
// AT9S_CMD_SW_UP = 1,
// AT9S_CMD_SW_MID = 3,
// AT9S_CMD_SW_DOWN = 2,
// } COMP_AT9S_CMD_SwitchPos_t;
// typedef struct
// {
// float ch_l_x; /* 左摇杆 X */
// float ch_l_y; /* 左摇杆 Y油门 */
// float ch_r_x; /* 右摇杆 X */
// float ch_r_y; /* 右摇杆 Y */
// /* 开关/旋钮离散化后状态 */
// COMP_AT9S_CMD_SwitchPos_t key_A;
// COMP_AT9S_CMD_SwitchPos_t key_B;
// COMP_AT9S_CMD_SwitchPos_t key_C;
// COMP_AT9S_CMD_SwitchPos_t key_D;
// COMP_AT9S_CMD_SwitchPos_t key_E;
// COMP_AT9S_CMD_SwitchPos_t key_F;
// COMP_AT9S_CMD_SwitchPos_t key_G;
// COMP_AT9S_CMD_SwitchPos_t key_H;
// float knob_left;
// float knob_right;
// float back_left;
// float back_right;
// } DEVICE_AT9S_Data_t;
// typedef struct
// { bool online;
// DEVICE_AT9S_Data_t data;
// } DEVICE_AT9S_t;
// /* Exported functions prototypes -------------------------------------------- */
// int8_t DEVICE_AT9S_Init(DEVICE_AT9S_t *at9s);
// int8_t DEVICE_AT9S_Restart(void);
// int8_t DEVICE_AT9S_StartDmaRecv(uint8_t *cmd_buffer);
// bool DEVICE_AT9S_WaitDmaCplt(uint32_t timeout);
// void DEVICE_AT9S_ParseRaw(const uint8_t raw[DEVICE_AT9S_FRAME_LEN], DEVICE_AT9S_t *out);
// #ifdef __cplusplus
// }
// #endif