static err_t low_level_output(struct netif *netif, struct pbuf *p) { //static xSemaphoreHandle xTxSemaphore = NULL; struct pbuf *q; //uint32_t l = 0; //u8_t *buffer ; #if ETH_PAD_SIZE pbuf_header(p, ETH_PAD_SIZE); /* drop the padding word */ #endif enc28j60BeginPacketSend(p->tot_len); for(q = p; q != NULL; q = q->next) { /* Send the data from the pbuf to the interface, one pbuf at a time. The size of the data in each pbuf is kept in the ->len variable. */ enc28j60PacketSend(q->payload, q->len); } enc28j60EndPacketSend(); //LINK_STATS_INC(link.xmit); return ERR_OK; }
static err_t low_level_output(struct netif *netif, struct pbuf *p) { struct ethernetif *ethernetif = netif->state; struct pbuf *q; #if ETH_PAD_SIZE pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */ #endif enc28j60BeginPacketSend(p->tot_len); for(q = p; q != NULL; q = q->next) { /* Send the data from the pbuf to the interface, one pbuf at a time. The size of the data in each pbuf is kept in the ->len variable. */ enc28j60PacketSend(q->payload, q->len); } enc28j60EndPacketSend(); #if ETH_PAD_SIZE pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ #endif LINK_STATS_INC(link.xmit); return ERR_OK; }