From f8e862f3b5e69de90d6bf20c2642271d324b4fc3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Mar 2021 11:40:34 +0000 Subject: switch to lwip-2.1.2 --- app/lwip_glue.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'app/lwip_glue.c') diff --git a/app/lwip_glue.c b/app/lwip_glue.c index 065c297..7f63ada 100644 --- a/app/lwip_glue.c +++ b/app/lwip_glue.c @@ -33,6 +33,30 @@ void start_lwip (void) } +static sys_prot_t ethernet_irq_enabled = 1; + +sys_prot_t sys_arch_protect (void) +{ + sys_prot_t ret; + + nvic_disable_irq (NVIC_ETH_IRQ); + compiler_mb(); + + ret = ethernet_irq_enabled; + ethernet_irq_enabled = 0; + + return ret; +} + +void sys_arch_unprotect (sys_prot_t lev) +{ + if (lev) { + ethernet_irq_enabled = 1; + compiler_mb(); + nvic_enable_irq (NVIC_ETH_IRQ); + } +} + -- cgit v1.2.3