给 ESP32 heap_caps_...() 函数传递什么 caps 参数?
几乎所有 ESP32 heap_caps_...() 函数都接受一个 uint32_t caps 参数。
如果你只想获取有关堆的一般信息,使用
heap_caps_default_example.cpp
MALLOC_CAP_DEFAULT作为参数。
大多数应用程序很少使用 MALLOC_CAP_DEFAULT 以外的任何值。其他半常用值包括:
MALLOC_CAP_SPIRAMMALLOC_CAP_INTERNAL(内存不得位于 SPI RAM 中)
有关 ESP32 内存如何组织的更多详细信息,请查看官方文档。
Check out similar posts by category:
ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow