Update NO_SYS_SampleCode.c: Don't access heap in IRQ

This commit is contained in:
Dirk Ziegelmeier 2016-08-06 20:28:01 +02:00
parent a20cdc597a
commit 2acfa0ebe7

View File

@ -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 */