| | |
| | | |
| | | 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; |
| | | } |
| | | |