/**
* @brief Static single allocation.
* @param size: Size of allocated memory
* @retval None
*/
void *USBD_static_malloc(uint32_t size)
{
static uint32_t mem[(sizeof(USBD_HID_HandleTypeDef)/4)+1];/* On 32-bit boundary */
return mem;
}
这个程序是什么意啊。只是为了看起来方便吗?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
Malloc是c库函数吧 一般都会支持
- // For footprint reasons and since only one allocation is handled in the MSC class
- // driver, the malloc/free is changed into a static allocation method
复制代码一周热门 更多>