Home > other >  Questions about the structure.
Questions about the structure.

Time:11-28

Typedef struct {int16 ElecTheta;
Int16 MechTheta;
Uint16 DirectionQep;
Uint16 QepCountIndex;
Uint16 RawTheta.
Uint32 MechScaler;
Uint16 LineEncoder;
Uint16 PolePairs;
Int16 CalibratedAngle;
Uint16 IndexSyncFlag;
Void * init () ();
Void (* calc) ();
Void (isr) * ();
} QEP.

Typedef QEP * QEP_handle;

# define QEP_DEFAULTS {0 x0, 0 x0, 0 x0, 0 x0, 0 x0, 0 x00020c4a, 0 x0, 4, 1250, 0 x0, \
(void (*) (Uint32) F281X_EV1_QEP_Init, \
(void (*) (Uint32) F281X_EV1_QEP_Calc, \
(void (*) (Uint32) F281X_EV1_QEP_Isr}

QEP qep1=QEP_DEFAULTS;


Can help explain QEP qep1=QEP_DEFAULTS; What's the meaning of the assignment? And what is the meaning of qep1?

CodePudding user response:

Is assigned a default value, all of qep1 structure members set a default value;
Qep1 should look is an initialization configuration, subsequent changes in the structure of the members of the body, and then transmitted to an initialization procedure, get the Handle,
  • Related