From 537bd836c98948fb85a0344232a8228e7dbca847 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 25 Aug 2016 22:23:11 +0200 Subject: [PATCH] Minor: More documentation updates --- doc/NO_SYS_SampleCode.c | 19 ++++++++++--------- src/netif/ethernet.c | 4 +++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/NO_SYS_SampleCode.c b/doc/NO_SYS_SampleCode.c index fea32d67..a8dc377b 100644 --- a/doc/NO_SYS_SampleCode.c +++ b/doc/NO_SYS_SampleCode.c @@ -10,7 +10,7 @@ void eth_mac_irq() pbuf_take(p, eth_data, eth_data_count); /* Put in a queue which is processed in main loop */ - if(!queue->tryPut(p)) { + if(!queue_try_put(&queue, p)) { /* queue is full -> packet loss */ pbuf_free(p); } @@ -30,10 +30,10 @@ static err_t netif_output(struct netif *netif, struct pbuf *p) MIB2_STATS_NETIF_INC(netif, ifoutnucastpkts); } - LockInterrupts(); + lock_interrupts(); pbuf_copy_partial(p, mac_send_buffer, p->tot_len, 0); /* Start MAC transmit here */ - UnlockInterrupts(); + unlock_interrupts(); return ERR_OK; } @@ -71,13 +71,14 @@ void main(void) netif_set_default(&netif); netif_set_up(&netif); - /* Start DHCP */ + /* Start DHCP and HTTPD */ dhcp_init(); + httpd_init(); while(1) { /* Check link state, e.g. via MDIO communication with PHY */ - if(linkStateChanged()) { - if(linkIsUp()) { + if(link_state_changed()) { + if(link_is_up()) { netif_set_link_up(&netif); } else { netif_set_link_down(&netif); @@ -85,9 +86,9 @@ void main(void) } /* Check for received frames, feed them to lwIP */ - LockInterrupts(); - struct pbuf* p = queue->tryGet(); - UnlockInterrupts(); + lock_interrupts(); + struct pbuf* p = queue_try_get(&queue); + unlock_interrupts(); if(p != NULL) { LINK_STATS_INC(link.recv); diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c index 6eeab95a..621838e1 100644 --- a/src/netif/ethernet.c +++ b/src/netif/ethernet.c @@ -69,7 +69,9 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}}; * @param p the received packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received * - * @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL + * @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL, + * @ref ETHARP_SUPPORT_VLAN and + * @ref LWIP_HOOK_VLAN_CHECK. */ err_t ethernet_input(struct pbuf *p, struct netif *netif)