git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4000 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
737aa2d9dd
commit
7664f48ad0
|
@ -275,8 +275,17 @@ msg_t lwip_thread(void *p) {
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
eventmask_t mask = chEvtWaitAny(ALL_EVENTS);
|
eventmask_t mask = chEvtWaitAny(ALL_EVENTS);
|
||||||
if (mask & PERIODIC_TIMER_ID)
|
if (mask & PERIODIC_TIMER_ID) {
|
||||||
(void)macPollLinkStatus(ÐD1);
|
bool_t current_link_status = macPollLinkStatus(ÐD1);
|
||||||
|
if (current_link_status != netif_is_link_up(&thisif)) {
|
||||||
|
if (current_link_status)
|
||||||
|
tcpip_callback_with_block((tcpip_callback_fn) netif_set_link_up,
|
||||||
|
&thisif, 0);
|
||||||
|
else
|
||||||
|
tcpip_callback_with_block((tcpip_callback_fn) netif_set_link_down,
|
||||||
|
&thisif, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mask & FRAME_RECEIVED_ID) {
|
if (mask & FRAME_RECEIVED_ID) {
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
while ((p = low_level_input(&thisif)) != NULL) {
|
while ((p = low_level_input(&thisif)) != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue