|
- int CopyCode2Ram(unsigned long start_addr, unsigned char *buf, int size)
- {
- unsigned int *pdwDest;
- unsigned int *pdwSrc;
- int i;
- if (bBootFrmNORFlash())
- {
- pdwDest = (unsigned int *)buf;
- pdwSrc = (unsigned int *)start_addr;
- /* 从 NOR Flash启动 */
- for (i = 0; i < size / 4; i++)
- {
- pdwDest[i] = pdwSrc[i];
- }
- return 0;
- }
- else
- {
- /* 初始化NAND Flash */
- nand_init_ll();
- /* 从 NAND Flash启动 */
- if (NF_ReadID() == 0x76 )
- nand_read_ll(buf, start_addr, (size + NAND_BLOCK_MASK)&~(NAND_BLOCK_MASK));
- else
- nand_read_ll_lp(buf, start_addr, (size + NAND_BLOCK_MASK_LP)&~(NAND_BLOCK_MASK_LP));
- return 0;
- }
- }
复制代码 其中的(size + NAND_BLOCK_MASK_LP)&~(NAND_BLOCK_MASK_LP)应该怎么理解?求高手解答!thank you! |
|