mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-13 07:14:31 +00:00
Revert "MEMP memory can now be declared static since LWIP_DECLARE_MEMORY_ALIGNED was introduced today"
This reverts commit e9b000308551eabbcf49a2b2c7a59a5b59f0fda9. It should still be publically accessible to be able to add prototype declarations anyway.
This commit is contained in:
parent
e0918d706e
commit
a463119597
@ -63,6 +63,9 @@ typedef enum {
|
|||||||
* - call ONCE before using pool (e.g. in some init() function): LWIP_MEMPOOL_INIT(my_private_pool);
|
* - call ONCE before using pool (e.g. in some init() function): LWIP_MEMPOOL_INIT(my_private_pool);
|
||||||
* - allocate: void* my_new_mem = LWIP_MEMPOOL_ALLOC(my_private_pool);
|
* - allocate: void* my_new_mem = LWIP_MEMPOOL_ALLOC(my_private_pool);
|
||||||
* - free: LWIP_MEMPOOL_FREE(my_private_pool, my_new_mem);
|
* - free: LWIP_MEMPOOL_FREE(my_private_pool, my_new_mem);
|
||||||
|
*
|
||||||
|
* To relocate a pool, declare it as extern in cc.h. Example for GCC:
|
||||||
|
* extern u8_t __attribute__((section(".onchip_mem"))) memp_memory_my_private_pool[];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern const struct memp_desc* const memp_pools[MEMP_MAX];
|
extern const struct memp_desc* const memp_pools[MEMP_MAX];
|
||||||
@ -89,7 +92,7 @@ extern const struct memp_desc* const memp_pools[MEMP_MAX];
|
|||||||
#else /* MEMP_MEM_MALLOC */
|
#else /* MEMP_MEM_MALLOC */
|
||||||
|
|
||||||
#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \
|
#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \
|
||||||
static LWIP_DECLARE_MEMORY_ALIGNED(memp_memory_ ## name ## _base, ((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))); \
|
LWIP_DECLARE_MEMORY_ALIGNED(memp_memory_ ## name ## _base, ((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))); \
|
||||||
\
|
\
|
||||||
LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \
|
LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \
|
||||||
\
|
\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user