mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-05 08:28:32 +00:00
Update NO_SYS_SampleCode.c: Don't access heap in IRQ
This commit is contained in:
parent
a20cdc597a
commit
2acfa0ebe7
@ -2,8 +2,8 @@ void eth_mac_irq()
|
|||||||
{
|
{
|
||||||
/* Service MAC IRQ here */
|
/* Service MAC IRQ here */
|
||||||
|
|
||||||
/* Allocate pbuf */
|
/* Allocate pbuf from pool (avoid using heap in interrupts) */
|
||||||
struct pbuf* p = pbuf_alloc(PBUF_RAW, eth_data_count, PBUF_RAM);
|
struct pbuf* p = pbuf_alloc(PBUF_RAW, eth_data_count, PBUF_POOL);
|
||||||
|
|
||||||
if(p != NULL) {
|
if(p != NULL) {
|
||||||
/* Copy ethernet frame into pbuf */
|
/* Copy ethernet frame into pbuf */
|
||||||
|
Loading…
Reference in New Issue
Block a user