主题中讨论的其他器件:C2000WARE
您好!
我想将数字电机控制库用作电机控制器的基础。 我正在使用"双轴伺服驱动器 FCL"中的一些代码。 在此项目中 、_motor_Vars_t_是包含许多算法变量的变量结构。 该结构的一个元素是:
volatile struct EQEP_REGS *pQEPRegs; // Aligned to lower 16-bits
eQEP_regs 在 f28003x_eQEP.h 中定义、我已将其包含在项目中。
此文件定义了前面提到的结构时会发生问题:
struct EQEP_REGS { Uint32 QPOSCNT; // Position Counter Uint32 QPOSINIT; // Position Counter Init Uint32 QPOSMAX; // Maximum Position Count Uint32 QPOSCMP; // Position Compare Uint32 QPOSILAT; // Index Position Latch Uint32 QPOSSLAT; // Strobe Position Latch Uint32 QPOSLAT; // Position Latch Uint32 QUTMR; // QEP Unit Timer Uint32 QUPRD; // QEP Unit Period Uint16 QWDTMR; // QEP Watchdog Timer Uint16 QWDPRD; // QEP Watchdog Period union QDECCTL_REG QDECCTL; // Quadrature Decoder Control union QEPCTL_REG QEPCTL; // QEP Control union QCAPCTL_REG QCAPCTL; // Qaudrature Capture Control union QPOSCTL_REG QPOSCTL; // Position Compare Control union QEINT_REG QEINT; // QEP Interrupt Control union QFLG_REG QFLG; // QEP Interrupt Flag union QCLR_REG QCLR; // QEP Interrupt Clear union QFRC_REG QFRC; // QEP Interrupt Force union QEPSTS_REG QEPSTS; // QEP Status Uint16 QCTMR; // QEP Capture Timer Uint16 QCPRD; // QEP Capture Period Uint16 QCTMRLAT; // QEP Capture Latch Uint16 QCPRDLAT; // QEP Capture Period Latch Uint16 rsvd1[15]; // Reserved union REV_REG REV; // QEP Revision Number union QEPSTROBESEL_REG QEPSTROBESEL; // QEP Strobe select register union QMACTRL_REG QMACTRL; // QMA Control register union QEPSRCSEL_REG QEPSRCSEL; // QEP Source Select Register };
联合体主要是 UINT16、但我尚未定义 UINT16类型、是否缺少包含? 我已经尝试从 eQEP 上的 Resource Explorer 中获取示例、但这些示例不使用 f28003x_eqep.h、而是另一个文件。
在同一个库中、我还缺少 Int32的定义、哪个文件包含此类型定义?
谢谢、此致