Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About 17.4 Question?
#1
I need read some parameters from EEPROM. My Code as below:

typedef struct
{
Uint16 ErrorCode;
Uint16 ErrDCVoltage;
Uint16 ErrMCUState;
Uint8 ErrMotorModeCmd;
Uint8 ErrDriveState;
Uint16 ErrTorqueCmd;
Uint16 ErrTorqueFed;
Uint16 ErrSpeedSet;
Uint16 ErrSpeed;
Uint8 ErrIGBTTemp;
Uint8 ErrMotorTemp;
Uint16 ErrUd;
Uint16 ErrUq;
Uint16 ErrIdRef;
Uint16 ErrIqRef;
Uint16 ErrIdFed;
Uint16 ErrIqFed;
Uint16 ErrState;
Uint8 Err12V;
Uint8 Angle;
Uint8 AngleInit;
Uint8 ErrMCUTemp;
Uint16 DC_Cur;
}ErrorLog_t;

void LoadError(ErrorLog_t* Err,Uint16 Index)
{
Uint16 i;
Uint16 *PrErrLog;
PrErrLog = (uint16 *)Err;
for(i=0u;iErrorCode = ReadEeprom(0u);
Err->ErrDCVoltage = ReadEeprom(1u);
Err->ErrMCUState = ReadEeprom(2u);
....

if my struct has more than 100 items, What can I do?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)