| | |
| | | int nMaxCurTime=0; |
| | | volatile int PowerState = 0; |
| | | |
| | | volatile int PowerDownEvent=0; |
| | | volatile int OldPowerDownEvent=0; |
| | | volatile int PowerDownFlag=0; |
| | | volatile int OldPowerDownFlag=1; |
| | | volatile int OldPowerDownEventTime=0; |
| | | int nMaxRunStatIndex=-1; |
| | | unsigned int nMaxRunStatSeq=0; |
| | |
| | | |
| | | int ReadFlashMem(void * pBuf, void * pAddrFlash, int nByteSize) |
| | | { |
| | | // memcpy(pBuf,pAddrFlash,nSize); |
| | | for (int i=0;i<nByteSize/4;i++) |
| | | { |
| | | ((uint32_t *)pBuf)[i] = ((uint32_t *)pAddrFlash)[i]; |
| | | } |
| | | for (int i=nByteSize/4*2;i<nByteSize/2;i++) |
| | | { |
| | | ((uint16_t *)pBuf)[i] = ((uint16_t *)pAddrFlash)[i]; |
| | | } |
| | | memcpy(pBuf,pAddrFlash,nByteSize); |
| | | // for (int i=0;i<nByteSize/4;i++) |
| | | // { |
| | | // ((uint32_t *)pBuf)[i] = ((uint32_t *)pAddrFlash)[i]; |
| | | // } |
| | | // for (int i=nByteSize/4*2;i<nByteSize/2;i++) |
| | | // { |
| | | // ((uint16_t *)pBuf)[i] = ((uint16_t *)pAddrFlash)[i]; |
| | | // } |
| | | |
| | | return nByteSize; |
| | | } |
| | | |