嵌入式开发者社区

标题: 请高手指教,谢谢~~~ [打印本页]

作者: yanchunqing2010    时间: 2016-8-13 13:24
标题: 请高手指教,谢谢~~~
想请教下,最后一句为什么是与0x3F取反相与。此例程是USB_HOST_MSC例程下, cppidma.c下面的函数,请高手指教,谢谢~~~
#define DESC_REGION_SIZE                    (1024 * 20) + SOC_CACHELINE_SIZE_MAX
unsigned int region0DescriptorSpace[DESC_REGION_SIZE];

/*Queue region setup */
    /*The Descriptor region address is aligned for SOC_CACHELINE_SIZE_MAX Byte access */
    descAddress = (unsigned int)region0DescriptorSpace;
    /*Add SOC_CACHELINE_SIZE_MAX to the starting address */
    descAddress = descAddress + BYTE_ALIGNMENT;
    /*Align the strating adress */
    descAddress &= ~0x3F;






作者: human    时间: 2016-8-22 13:47
该地址要求64位边界对齐




欢迎光临 嵌入式开发者社区 (https://51ele.net/) Powered by Discuz! X3.4