diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-19 11:40:34 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-19 11:43:23 +0000 |
commit | f8e862f3b5e69de90d6bf20c2642271d324b4fc3 (patch) | |
tree | 86b1ed884110e6a85d64608ceaa2f95434957d1f /app/lwip_glue.c | |
parent | c6dc3064e7ebf1f13826487105f748745434da4d (diff) | |
download | clock-f8e862f3b5e69de90d6bf20c2642271d324b4fc3.tar.gz clock-f8e862f3b5e69de90d6bf20c2642271d324b4fc3.tar.bz2 clock-f8e862f3b5e69de90d6bf20c2642271d324b4fc3.zip |
switch to lwip-2.1.2
Diffstat (limited to 'app/lwip_glue.c')
-rw-r--r-- | app/lwip_glue.c | 24 |
1 files changed, 24 insertions, 0 deletions
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); + } +} + |