Minor: More documentation updates

This commit is contained in:
Dirk Ziegelmeier 2016-08-25 22:23:11 +02:00
parent 57468b8a30
commit 537bd836c9
2 changed files with 13 additions and 10 deletions

View File

@ -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);

View File

@ -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)